123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- version: "3.7"
-
- services:
- zitap:
- container_name: zitap-django
- build: .
-
- restart: on-failure
- environment:
- DJANGO_SECRET_KEY: <SECRET-KEY>
- DJANGO_DEBUG: "False"
- DJANGO_ALLOWED_HOSTS: <IP>,zitap.example.com,localhost
- DJANGO_CSRF_TRUSTED_ORIGINS: https://zitap.example.com
- DATABASE_ENGINE: django.db.backends.mysql
- DATABASE_NAME: <DATABASE-NAME>
- DATABASE_USERNAME: <USERNAME>
- DATABASE_PASSWORD: <PASSWORD>
- DATABASE_HOST: <IP-ADDRESS>
- 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
|