bundesdata_web_app/docker-compose.yml
2020-12-04 15:55:11 +01:00

41 lines
1.0 KiB
YAML
Executable File

version: '3.5'
services:
web:
build: ./app
volumes:
- ./app/blog:/usr/src/app/blog
- ./app/bundesdata_app:/usr/src/app/bundesdata_app
- ./app/ngram_viewer:/usr/src/app/ngram_viewer
- ./app/speakers:/usr/src/app/speakers
- ./app/speeches:/usr/src/app/speeches
- ./input_volume/:/usr/src/app/input_data
- ./static_volume:/usr/src/app/staticfiles
expose:
- 8000
env_file: live.env
depends_on:
- db
command: >
bash -c "./wait-for-it/wait-for-it.sh db:5432 --strict --timeout=0
&& gunicorn --bind 0.0.0.0:8000 --workers=4 bundesdata_app.wsgi:application"
db:
env_file: live.env
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB_NAME: ${POSTGRES_DB_NAME}
expose:
- 5432
image: postgres:11.2
volumes:
- ./postgres_data:/var/lib/postgresql/data/
nginx:
build: ./nginx
volumes:
- ./static_volume:/usr/src/app/staticfiles
ports:
- 8000:80
depends_on:
- web