2022-02-03 16:47:32 -05:00
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
services:
|
2022-02-03 17:27:25 -05:00
|
|
|
flask:
|
2022-02-03 16:47:32 -05:00
|
|
|
build:
|
2022-02-03 17:27:25 -05:00
|
|
|
context: ./flask
|
2022-02-03 16:47:32 -05:00
|
|
|
dockerfile: Dockerfile.prod
|
|
|
|
command: gunicorn --bind 0.0.0.0:5000 manage:app
|
|
|
|
volumes:
|
2022-02-03 17:27:25 -05:00
|
|
|
- static_volume:/home/app/web/forest/static
|
|
|
|
- media_volume:/home/app/web/forest/media
|
2022-02-03 16:47:32 -05:00
|
|
|
expose:
|
|
|
|
- 5000
|
|
|
|
env_file:
|
|
|
|
- ./.env.prod
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
db:
|
|
|
|
image: postgres:13-alpine
|
|
|
|
volumes:
|
|
|
|
- postgres_data_prod:/var/lib/postgresql/data/
|
|
|
|
env_file:
|
|
|
|
- ./.env.prod
|
|
|
|
nginx:
|
2022-02-03 17:27:25 -05:00
|
|
|
build: ./nginx
|
2022-02-03 16:47:32 -05:00
|
|
|
volumes:
|
2022-02-03 17:27:25 -05:00
|
|
|
- static_volume:/home/app/web/forest/static
|
|
|
|
- media_volume:/home/app/web/forest/media
|
2022-02-03 16:47:32 -05:00
|
|
|
ports:
|
|
|
|
- 1337:80
|
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgres_data_prod:
|
|
|
|
static_volume:
|
|
|
|
media_volume:
|