-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
183 lines (173 loc) · 6.24 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
services:
localstack:
build:
context: ./docker/localstack/
image: igvfd-localstack
environment:
- AWS_DEFAULT_REGION=us-west-2
- AWS_ACCESS_KEY_ID=testing
- AWS_SECRET_ACCESS_KEY=testing
- SERVICES=sqs,sts
- LS_LOG=warn
ports:
- "4566:4566"
postgres:
build:
context: ./docker/postgres/
image: igvfd-postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
opensearch:
build:
context: ./docker/opensearch/
image: igvfd-opensearch
environment:
- "discovery.type=single-node"
- "node.name=opensearch-node1"
- "OPENSEARCH_JAVA_OPTS=-Xms256m -Xmx256m"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
volumes:
- "./config/opensearch/opensearch.yml:/usr/share/opensearch/config/opensearch.yml"
ports:
- "9200:9200"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
create-mapping:
build:
context: .
dockerfile: ./docker/pyramid/Dockerfile
image: igvfd-pyramid
environment:
- LOCALSTACK_ENDPOINT_URL=http://localstack:4566
- TRANSACTION_QUEUE_URL=http://localhost:4566/000000000000/transaction-queue
- INVALIDATION_QUEUE_URL=http://localhost:4566/000000000000/invalidation-queue
- DEDUPLICATION_QUEUE_URL=http://localhost:4566/000000000000/deduplication-queue
- TRANSACTION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/transaction-dead-letter-queue
- INVALIDATION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/invalidation-dead-letter-queue
- DEDUPLICATION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/deduplication-dead-letter-queue
volumes:
- ".:/igvfd"
- "/igvfd/src/igvfd.egg-info"
- "/igvfd/src/igvfd/static"
entrypoint: ./docker/wait-for-local-services-entrypoint.sh
command: /scripts/pyramid/run-create-mapping.sh
depends_on:
- postgres
- opensearch
- localstack
loader:
build:
context: .
dockerfile: ./docker/pyramid/Dockerfile
image: igvfd-pyramid
environment:
- LOCALSTACK_ENDPOINT_URL=http://localstack:4566
- TRANSACTION_QUEUE_URL=http://localhost:4566/000000000000/transaction-queue
- INVALIDATION_QUEUE_URL=http://localhost:4566/000000000000/invalidation-queue
- DEDUPLICATION_QUEUE_URL=http://localhost:4566/000000000000/deduplication-queue
- TRANSACTION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/transaction-dead-letter-queue
- INVALIDATION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/invalidation-dead-letter-queue
- DEDUPLICATION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/deduplication-dead-letter-queue
volumes:
- ".:/igvfd"
- "/igvfd/src/igvfd.egg-info"
- "/igvfd/src/igvfd/static"
entrypoint: ./docker/wait-for-local-services-entrypoint.sh
command: load-development
depends_on:
- create-mapping
- postgres
- opensearch
- localstack
pyramid:
build:
context: .
dockerfile: ./docker/pyramid/Dockerfile
image: igvfd-pyramid
environment:
- LOCALSTACK_ENDPOINT_URL=http://localstack:4566
- TRANSACTION_QUEUE_URL=http://localhost:4566/000000000000/transaction-queue
- INVALIDATION_QUEUE_URL=http://localhost:4566/000000000000/invalidation-queue
- DEDUPLICATION_QUEUE_URL=http://localhost:4566/000000000000/deduplication-queue
- TRANSACTION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/transaction-dead-letter-queue
- INVALIDATION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/invalidation-dead-letter-queue
- DEDUPLICATION_DEAD_LETTER_QUEUE_URL=http://localhost:4566/000000000000/deduplication-dead-letter-queue
volumes:
- ".:/igvfd"
- "/igvfd/src/igvfd.egg-info"
- "/igvfd/src/igvfd/static"
entrypoint: ./docker/wait-for-local-services-entrypoint.sh
command: /scripts/pyramid/run-development.sh
ports:
- "6543:6543"
depends_on:
- loader
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
image: igvfd-nginx
volumes:
- "./config/nginx/docker.conf:/etc/nginx/nginx.conf"
command: nginx -c /etc/nginx/nginx.conf -g 'daemon off; pid /dev/null;'
ports:
- "8000:8000"
depends_on:
- pyramid
invalidation-service:
build:
context: ./docker/snoindex/
image: igvfd-snoindex
environment:
- LOCALSTACK_ENDPOINT_URL=http://localstack:4566
- OPENSEARCH_URL=http://opensearch:9200
- TRANSACTION_QUEUE_URL=http://localhost:4566/000000000000/transaction-queue
- INVALIDATION_QUEUE_URL=http://localhost:4566/000000000000/invalidation-queue
- RESOURCES_INDEX=snovault-resources
volumes:
- "./docker/wait-for-local-services-entrypoint.sh:/snovault-index/wait-for-local-services-entrypoint.sh"
entrypoint: ./wait-for-local-services-entrypoint.sh
command: run-bulk-invalidation-service
depends_on:
- pyramid
indexing-service:
build:
context: ./docker/snoindex/
image: igvfd-snoindex
environment:
- LOCALSTACK_ENDPOINT_URL=http://localstack:4566
- INVALIDATION_QUEUE_URL=http://localhost:4566/000000000000/invalidation-queue
- OPENSEARCH_URL=http://opensearch:9200
- BACKEND_URL=http://nginx:8000
- BACKEND_KEY=foobar
- BACKEND_SECRET_KEY=bazqux
- RESOURCES_INDEX=snovault-resources
volumes:
- "./docker/wait-for-local-services-entrypoint.sh:/snovault-index/wait-for-local-services-entrypoint.sh"
entrypoint: ./wait-for-local-services-entrypoint.sh
command: run-indexing-service
depends_on:
- pyramid
deduplication-service:
build:
context: ./docker/dedup/
image: igvfd-dedup
environment:
- LOCALSTACK_ENDPOINT_URL=http://localstack:4566
- QUEUE_URL=http://localhost:4566/000000000000/invalidation-queue
- STORAGE_QUEUE_URL=http://localhost:4566/000000000000/deduplication-queue
- NUM_WORKERS=20
- AWS_ACCESS_KEY_ID=testing
- AWS_SECRET_ACCESS_KEY=testing
- AWS_DEFAULT_REGION=us-west-2
command: ./run-forever.sh
depends_on:
- indexing-service