-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
209 lines (193 loc) · 5.91 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
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
version: "3.7"
services:
csdt_neo4j:
# image: neo4j:3.5.3
image: neo4j:latest
hostname: csdt_neo4j
container_name: neo4j
ports:
- 7474:7474
- 7687:7687
volumes:
- ./neo4j/data:/var/lib/neo4j/data
- ./neo4j/logs:/logs
- ./neo4j/import:/var/lib/neo4j/import
- ./neo4j/plugins:/plugins
# - ./certbot/conf/live/data.artisanalfutures.org/fullchain.pem:/var/lib/neo4j/certificates/neo4j.cert
# - ./certbot/conf/live/data.artisanalfutures.org/privkey.pem:/var/lib/neo4j/certificates/neo4j.key
# - ./neo4j/conf:/var/lib/neo4j/conf
# - ./neo4j.conf:/var/lib/neo4j/conf/neo4j.conf
environment:
- NEO4J_AUTH=${CSDT_USER}/${CSDT_PASSWORD}
# - NEO4J_dbms_connector_bolt_address=0.0.0.0:7687
# - NEO4J_dbms_connector_http_address=0.0.0.0:7474
# - NEO4J_dbms.connector.bolt.enabled=true
# - NEO4J_dbms.connector.bolt.tls_level=OPTIONAL
# - NEO4J_dbms.connector.bolt.listen_address=0.0.0.0:7687
# - NEO4J_dbms.connector.bolt.advertised_address=bolt.artisanalfutures.org
# - NEO$J_dbms.connector.http.enabled=true
# - NEO$J_dbms.connector.http.listen_address=0.0.0.0:7474
# - NEO$J_dbms.connector.http.advertised_address=${DOMAIN}
# - NEO$J_dbms.ssl.policy.bolt.enabled=true
# - NEO$J_dbms.ssl.policy.bolt.base_directory=certificates/bolt
# - NEO$J_dbms.ssl.policy.bolt.private_key=private.key
# - NEO$J_dbms.ssl.policy.bolt.public_certificate=public.crt
# - NEO4J_dbms.ssl.policy.bolt.enabled=true
# - NEO4J_dbms.ssl.policy.bolt.base_directory=certificates/bolt
# - NEO4J_dbms.ssl.policy.bolt.private_key=key.pem
# - NEO4J_dbms.ssl.policy.bolt.public_certificate=cert.pem
# - NEO4J_dbms.ssl.policy.bolt.client_auth=NONE
env_file:
- .env
address_service:
build: ./address-service
command: uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
volumes:
- ./address-service/:/app/
- ./address-service/data/:/data/
ports:
- 8001:8000
environment:
- DATA_PREFIX=/app
- SERVICE_PATH=/api/v1/addresses
eeio_service:
build:
context: ./eco-service
dockerfile: Dockerfile.eeio-api
volumes:
- ./eco-service/:/app/
- ./eco-service/data/:/data/
ports:
- 7070:7070
environment:
- DATA_PREFIX=/app
eco_service:
build:
context: ./eco-service
dockerfile: Dockerfile.eco-social-api
command: uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
volumes:
- ./eco-service/:/app/
- ./eco-service/data/:/data/
ports:
- 8002:8000
environment:
- DATA_PREFIX=/app
- SERVICE_PATH=/api/v1/eco
- USEEIO_API_HOST= http://eeio_service:7070/api
depends_on:
- eeio_service
product_service:
build:
context: ./product-service
dockerfile: Dockerfile.web
command: uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
volumes:
- ./product-service/:/app/
env_file:
- .env
environment:
- DATA_PREFIX=/app
- SERVICE_PATH=/api/v1/products
depends_on:
- csdt_neo4j
- eco_service
ports:
- 8004:8000
assessment_service:
build:
context: ./assessment-service
dockerfile: Dockerfile.main
command: uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
volumes:
- ./assessment-service/:/app/
env_file:
- .env
environment:
- DATA_PREFIX=/app
- SERVICE_PATH=/api/v1/assessment
- PRODUCT_SERVICE= http://product_service:8000/api/v1/products
- ECO_SOCIAL_SERVICE= http://eco_service:8000/api/v1/eco
depends_on:
- csdt_neo4j
- eco_service
- product_service
ports:
- 8003:8000
# TODO: Add JWT authentication keys (JWT Authentication for WP REST API plugin)
# wordpress:
# image: wordpress:latest
# restart: always
# environment:
# WORDPRESS_DB_HOST: ${WP_DB_HOST}
# WORDPRESS_DB_USER: ${WP_DB_USER}
# WORDPRESS_DB_PASSWORD: ${WP_DB_PASSWORD}
# WORDPRESS_DB_NAME: ${WP_DB_NAME}
# WORDPRESS_CONFIG_EXTRA: |
# define('WP_SITEURL', 'https://${DOMAIN}');
# define('WP_HOME', 'https://${DOMAIN}');
# volumes:
# - ./backend:/var/www/html
# depends_on:
# - db
# db:
# image: mysql:5.7
# restart: always
# environment:
# MYSQL_DATABASE: ${WP_DB_NAME}
# MYSQL_USER: ${WP_DB_USER}
# MYSQL_PASSWORD: ${WP_DB_PASSWORD}
# MYSQL_RANDOM_ROOT_PASSWORD: "1"
routing_service:
build: ./routing-service
command: osrm-routed --algorithm mld -t 32 --port 8000 /data/michigan-latest.osrm
ports:
- 8005:8000
optimization_service:
build: ./optimization-service
entrypoint: /bin/bash
command: /docker-entrypoint.sh
volumes:
- ./optimization-service/vroom-conf:/conf/:rw
ports:
- 3000:3000
environment:
- VROOM_ROUTER=osrm
depends_on:
- routing_service
# style_service:
# build: ./style-service
# ports:
# - 8501:8501
nginx:
image: nginx:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./nginx_config.conf:/etc/nginx/conf.d/default.conf
- ./default-nginx-config.conf:/etc/nginx/nginx.conf
# - ./dev_nginx_config.conf:/etc/nginx/conf.d/default.conf
- ./backend:/var/www/html
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
depends_on:
- address_service
- eco_service
- product_service
- routing_service
- optimization_service
# - wordpress
# - style_service
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
command: certonly --webroot -w /var/www/certbot --dry-run --email ${EMAIL} -d ${DOMAIN} --agree-tos
depends_on:
- nginx
volumes:
backend: