2020-02-13 13:14:36 +00:00
|
|
|
services:
|
|
|
|
web:
|
|
|
|
image: nginx
|
|
|
|
volumes:
|
|
|
|
- ./nginx/nginx.conf:/tmp/nginx.conf
|
|
|
|
environment:
|
|
|
|
- FLASK_SERVER_ADDR=backend:9091
|
|
|
|
command: /bin/bash -c "envsubst < /tmp/nginx.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
|
|
|
ports:
|
2020-03-23 23:36:46 +00:00
|
|
|
- 80:80
|
2020-02-13 13:14:36 +00:00
|
|
|
depends_on:
|
2020-03-23 23:36:46 +00:00
|
|
|
- backend
|
2022-07-12 09:31:52 +00:00
|
|
|
|
2020-02-13 13:14:36 +00:00
|
|
|
backend:
|
2022-07-12 09:31:52 +00:00
|
|
|
build:
|
|
|
|
context: flask
|
|
|
|
target: builder
|
|
|
|
# flask requires SIGINT to stop gracefully
|
|
|
|
# (default stop signal from Compose is SIGTERM)
|
|
|
|
stop_signal: SIGINT
|
|
|
|
environment:
|
2020-03-23 23:36:46 +00:00
|
|
|
- FLASK_SERVER_PORT=9091
|
2020-02-13 13:14:36 +00:00
|
|
|
volumes:
|
2020-03-23 23:36:46 +00:00
|
|
|
- ./flask:/src
|
2020-02-13 13:14:36 +00:00
|
|
|
depends_on:
|
|
|
|
- mongo
|
2022-07-12 09:31:52 +00:00
|
|
|
|
2020-02-13 13:14:36 +00:00
|
|
|
mongo:
|
|
|
|
image: mongo
|