-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-production.yaml
222 lines (208 loc) · 5.35 KB
/
docker-compose-production.yaml
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
version: "3.7"
services:
flask_app:
build: .
container_name: flask_app
ports:
- "5000:5000"
volumes:
- .:/app
- ./pre-computed-data:/app/pre-computed-data
- ./schema_insertion_temp:/app/schema_insertion_temp
- ./compressed_schemas:/app/compressed_schemas
- ./prodigal_training_files:/app/prodigal_training_files
- ./log_files:/app/log_files
environment:
- FLASK_ENV=development
- BASE_URL=https://tutorial.chewbbaca.online/NS/api/
- DEFAULTHGRAPH=http://localhost:8890/chewiens
- LOCAL_SPARQL=http://172.19.1.3:8890/sparql
- URL_SEND_LOCAL_VIRTUOSO=http://172.19.1.3:8890/DAV/test_folder/data
# - CELERY_BROKER_URL=redis://172.19.1.4:6379/0
# - CELERY_RESULT_BACKEND=redis://172.19.1.4:6379/0
networks:
test:
ipv4_address: 172.19.1.1
depends_on:
- redis
- postgres_compose
- virtuoso
postgres_compose:
image: postgres:10
container_name: "postgres"
# Setup the username, password, and database name.
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=test
- POSTGRES_DB=ref_ns_sec
# Maps port 54320 (localhost) to port 5432 on the container.
ports:
- "54320:5432"
volumes:
- ./postgres_data:/var/lib/postgresql/data
networks:
test:
ipv4_address: 172.19.1.2
pgadmin4:
image: dpage/pgadmin4:4.26
restart: always
container_name: "pgadmin4"
environment:
PGADMIN_DEFAULT_EMAIL: ""
PGADMIN_DEFAULT_PASSWORD: ""
ports:
- "5050:80"
depends_on:
- postgres_compose
volumes:
- pgadmin:/pgadmin4/pgadmin
networks:
test:
virtuoso:
image: openlink/virtuoso-opensource-7:7.2.6-r3-g1b16668
container_name: virtuoso
environment:
- VIRTUOSO_DB_USER=demo
- VIRTUOSO_DB_PASSWORD=chewiens
- DEFAULT_GRAPH=http://localhost:8890/chewiens
- DBA_PASSWORD=test
- DAV_PASSWORD=test
volumes:
# This volume contains the virtuoso database (virtuoso.db)
- ./virtuoso_data/db:/opt/virtuoso-opensource/database
# This volume contains a file with a SQL query.
# This query will give permission to perform updates through SPARQL.
- ./virtuoso_data/sql_query.sql:/opt/virtuoso-opensource/initdb.d/sql_query.sql
ports:
- "8890:8890"
- "1111:1111"
networks:
test:
ipv4_address: 172.19.1.3
redis:
image: redis:5.0.6
container_name: redis
volumes:
- ./redis_data:/data
ports:
- "6379:6379"
networks:
test:
ipv4_address: 172.19.1.4
flower_container:
image: mher/flower:0.9.4
container_name: flower_container
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- FLOWER_URL_PREFIX=flower
- FLOWER_PORT=5555
ports:
- "5555:5555"
depends_on:
- "redis"
volumes:
- flower:/usr/local/lib/python3.8/site-packages/flower
networks:
test:
loci_worker:
build:
context: .
dockerfile: CELERY
container_name: loci_worker
command: sh -c "celery -A app.api.routes worker -l info -Q loci_queue -c 1"
volumes:
- .:/app
links:
- redis
depends_on:
- redis
networks:
- test
alleles_worker:
build:
context: .
dockerfile: CELERY
container_name: alleles_worker
command: sh -c "celery -A app.api.routes worker -l info -Q alleles_queue -c 1"
volumes:
- .:/app
links:
- redis
depends_on:
- redis
networks:
- test
sync_worker:
build:
context: .
dockerfile: CELERY
container_name: sync_worker
command: sh -c "celery -A app.api.routes worker -l info -Q sync_queue -c 1"
volumes:
- .:/app
links:
- redis
depends_on:
- redis
networks:
- test
periodic_worker:
build:
context: .
dockerfile: CELERY
container_name: periodic_worker
environment:
- BASE_URL=https://tutorial.chewbbaca.online/NS/api/
- DEFAULTHGRAPH=http://localhost:8890/chewiens
- LOCAL_SPARQL=http://172.19.1.3:8890/sparql
- CELERY_BROKER_URL=redis://172.19.1.4:6379/0
- CELERY_RESULT_BACKEND=redis://172.19.1.4:6379/0
command: sh -c "celery -A periodic_jobs worker -B -Q periodic_queue -l info -c 1"
volumes:
- .:/app
links:
- redis
depends_on:
- redis
networks:
- test
## Production
nginx_react:
build:
context: ./frontend_react/chewie_ns
dockerfile: Dockerfile.prod
container_name: nginx
volumes:
- ./self_certs:/etc/nginx/certs
- ./compressed_schemas:/var/www/my-app/compressed_schemas
- ./prodigal_training_files:/var/www/my-app/prodigal_training_files
- ./frontend_react/chewie_ns/certs-data/:/data/letsencrypt/
- /etc/letsencrypt/:/etc/letsencrypt/
- type: volume
source: flower
target: /var/www/flower
volume:
nocopy: true
- type: volume
source: pgadmin
target: /var/www/pgadmin
volume:
nocopy: true
ports:
- "80:80"
- "443:443"
depends_on:
- flask_app
restart: always
networks:
test:
ipv4_address: 172.19.1.5
networks:
test:
ipam:
driver: default
config:
- subnet: 172.19.0.0/16
volumes:
pgadmin:
flower: