version: "3" services: django: build: context: . dockerfile: django.Dockerfile image: knboard_production_django volumes: - "django-static:/app/django-static" - "media:/app/media" - "./backend/settings:/app/settings" env_file: - .env nginx: build: context: . dockerfile: nginx.Dockerfile command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" image: knboard_production_nginx ports: - "80:80" - "443:443" volumes: - "django-static:/usr/share/nginx/django-static" - "media:/usr/share/nginx/html/media" - "./production/nginx/nginx.conf:/etc/nginx/nginx.conf" - "./production/nginx/proxy.conf:/etc/nginx/proxy.conf" - "./data/certbot/conf:/etc/letsencrypt" - "./data/certbot/www:/var/www/certbot" certbot: image: certbot/certbot entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" volumes: - "./data/certbot/conf:/etc/letsencrypt" - "./data/certbot/www:/var/www/certbot" postgres: image: postgres:11 volumes: - "/var/lib/postgresql/knboard:/var/lib/postgresql/data" env_file: - .env volumes: media: django-static: