version: "3.7" services: zitap: container_name: zitap-django build: . restart: on-failure environment: DJANGO_SECRET_KEY: DJANGO_DEBUG: "False" DJANGO_ALLOWED_HOSTS: ,zitap.example.com,localhost DJANGO_CSRF_TRUSTED_ORIGINS: https://zitap.example.com DATABASE_ENGINE: django.db.backends.mysql DATABASE_NAME: DATABASE_USERNAME: DATABASE_PASSWORD: DATABASE_HOST: DATABASE_PORT: 3306 DATABASE_OPTIONS: "{\"init_command\": \"SET sql_mode='STRICT_TRANS_TABLES'\"}" volumes: - ./project:/app/project - ./zitap:/app/zitap - ./static:/static networks: - mysql - proxy labels: - 'traefik.enable=true' - 'traefik.http.routers.zitap.rule=Host(`zitap.example.com`)' - 'traefik.http.routers.zitap.tls=true' - 'traefik.http.routers.zitap.service=zitap' - 'traefik.http.services.zitap.loadbalancer.server.port=8000' - 'traefik.http.routers.zitap-static.rule=Host(`zitap.example.com`) && PathPrefix(`/static/`)' - 'traefik.http.routers.zitap-static.entrypoints=https' - 'traefik.http.routers.zitap-static.tls=true' - 'traefik.http.routers.zitap-static.service=zitap-static' - 'traefik.http.services.zitap-static.loadbalancer.server.port=80' networks: mysql: external: True proxy: external: True