version: '3' services: db: restart: always image: postgres:9.6-alpine volumes: - ./postgres-data:/var/lib/postgresql/data env_file: - env.production worker: build: context: . dockerfile: Dockerfile.worker image: wort-worker env_file: - iam/wort_s3.env web: restart: always build: context: . dockerfile: Dockerfile command: > gunicorn -b 0.0.0.0:5000 --access-logfile - --reload "wort.app:create_app()" environment: PYTHONUNBUFFERED: 'true' FLASK_APP: 'wortapp.py' ports: - "5000:5000" links: - db depends_on: - db env_file: - env.production volumes: - .:/app/wort proxy: restart: always build: context: nginx dockerfile: Dockerfile volumes: - ./letsencrypt_certs:/etc/nginx/certs - ./letsencrypt_www:/var/www/letsencrypt ports: - "80:80" - "443:443" letsencrypt: image: certbot/certbot command: /bin/true volumes: - ./letsencrypt_certs:/etc/letsencrypt - ./letsencrypt_www:/var/www/letsencrypt