From 44f3f014513e06807bcf9ba2d80e8162fd701eb7 Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Mon, 7 Dec 2020 15:28:50 +0100 Subject: [PATCH] Add traefik nginx lables for static file serving. --- docker-compose.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index fa399ee..540b302 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ version: '3.5' services: web: build: ./app + restart: unless-stopped volumes: - ./app/blog:/usr/src/app/blog - ./app/bundesdata_app:/usr/src/app/bundesdata_app @@ -19,8 +20,10 @@ services: 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 + restart: unless-stopped environment: POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_USER: ${POSTGRES_USER} @@ -30,8 +33,10 @@ services: image: postgres:11.2 volumes: - ./postgres_data:/var/lib/postgresql/data/ + nginx: build: ./nginx + restart: unless-stopped volumes: - ./static_volume:/usr/src/app/staticfiles ports: