-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
181 lines (170 loc) · 4.28 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
version: '3.7'
services:
flask_app:
build: .
container_name: flask_app
ports:
- "5000:5000"
#expose:
# - "8000"
volumes:
# this will nullify operations in this directory like
# downloading files, extracting and installing in this directory
- .:/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=http://127.0.0.1:5000/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
#restart: always
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
virtuoso:
image: openlink/virtuoso-opensource-7:7.2
container_name: virtuoso
environment:
#- SPARQL_UPDATE=true
- VIRTUOSO_DB_USER=demo
- VIRTUOSO_DB_PASSWORD=chewiens
- DEFAULT_GRAPH=http://localhost:8890/chewiens
- DBA_PASSWORD=test
- DAV_PASSWORD=test
#- LOG_FILE_LOCATION=/var/lib/virtuoso-opensource-6.1/db/
#- VIRTUOSO_INI_FILE=./virtuoso.ini
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
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=http://127.0.0.1:5000/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/internal_redirect/compressed_schemas
- ./prodigal_training_files:/var/www/my-app/internal_redirect/prodigal_training_files
ports:
- "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