bundesdata_web_app/docker-compose.yml
2020-12-16 13:26:49 +01:00

49 lines
1.2 KiB
YAML
Executable File

version: '3.5'
services:
web:
build: ./app
container_name: bundesdata-web
restart: unless-stopped
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:
container_name: bundesdata-db
env_file: live.env
restart: unless-stopped
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:
container_name: bundesdata-nginx
build: ./nginx
restart: unless-stopped
volumes:
- ./static_volume:/usr/src/app/staticfiles
ports:
- 8000:80
depends_on:
- web