version: '3' services: web: container_name: bestnine-web restart: always build: ./web expose: - "8000" volumes: - ./web:/code env_file: - .env command: /usr/local/bin/gunicorn -w 2 -b :8000 app:app networks: - proxy nginx: container_name: bestnine-nginx restart: always image: nginx:latest ports: - "127.0.0.1:3080:80" expose: - "80" volumes: - ./nginx/bestnine.conf:/etc/nginx/conf.d/default.conf - ./web/html:/usr/share/nginx/html links: - web:web environment: VIRTUAL_HOST: bestnine.qiwihui.com LETSENCRYPT_HOST: bestnine.qiwihui.com LETSENCRYPT_EMAIL: qwh005007@gmail.com VIRTUAL_PORT: "80" HTTPS_METHOD: redirect networks: - proxy volumes: web-data: networks: proxy: external: name: nginx-proxy