docker-compose.yml 741 B

12345678910111213141516171819202122232425262728293031323334
  1. version: "3.7"
  2. services:
  3. zitap:
  4. container_name: django
  5. build: .
  6. restart: on-failure
  7. environment:
  8. DJANGO_SECRET_KEY: <SECRET_KEY>
  9. DJANGO_DEBUG: "False"
  10. DJANGO_ALLOWED_HOSTS: <IP>,<DOMAIN>,localhost
  11. DJANGO_CSRF_TRUSTED_ORIGINS: <DOMAIN>
  12. DATABASE_ENGINE: mysql
  13. DATABASE_NAME: django
  14. DATABASE_USERNAME: <USERNAME>
  15. DATABASE_PASSWORD: <PASSWORD>
  16. DATABASE_HOST: <IP>
  17. DATABASE_PORT: 3306
  18. DATABASE_OPTIONS: "{\"init_command\": \"SET sql_mode='STRICT_TRANS_TABLES'\"}"
  19. volumes:
  20. - ./project:/app/project
  21. - ./zitap:/app/zitap
  22. - ./static:/static
  23. - ./data:/data
  24. ports:
  25. - 8000:8000
  26. command: ["/code/production.sh"]