cloud-docker-stack.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. networks:
  2. traefik-public:
  3. external: true
  4. services:
  5. backend:
  6. build:
  7. args:
  8. INSTALL_DEV: "true"
  9. INSTALL_JUPYTER: "false"
  10. context: /root/video-maker/backend
  11. dockerfile: backend.dockerfile
  12. command: /start-reload.sh
  13. deploy:
  14. labels:
  15. traefik.constraint-label-stack: cloud.choozmo.com
  16. traefik.enable: "true"
  17. traefik.http.routers.ai-anchor-com-backend-http.rule: PathPrefix(`/api`) ||
  18. PathPrefix(`/docs`) || PathPrefix(`/redoc`)
  19. traefik.http.services.ai-anchor-com-backend.loadbalancer.server.port: '80'
  20. environment:
  21. BACKEND_CORS_ORIGINS: '["https://payment.ecpay.com.tw", "https://vendor-stage.ecpay.com.tw","http://dev.cloud.choozmo.com:5173",
  22. "http://dev.cloud.choozmo.com:8080", "http://cloud.choozmo.com:8080", "https://cloud.choozmo.com",
  23. "http://cloud.choozmo.com","http://172.105.219.42", "http://local.ai-anchor.com:5173",
  24. "http://local.ai-anchor.com:8080", "http://localhost", "http://localhost:4200",
  25. "http://localhost:3000", "http://localhost:5173", "http://localhost:8080",
  26. "https://localhost", "https://localhost:4200", "https://localhost:3000", "https://localhost:8080",
  27. "http://dev.ai-anchor.com:3000", "http://dev.ai-anchor.com:5173", "http://dev.ai-anchor.com:8080",
  28. "https://stag.ai-anchor.com", "https://ai-anchor.com"]'
  29. BACKEND_VIDEO_STORAGE: backend_storage/videos
  30. BACKEND_ZIP_STORAGE: backend_storage/zips
  31. CELERY_VIDEO_STORAGE: celery_storage/videos
  32. CELERY_ZIP_STORAGE: celery_storage/zips
  33. DOCKER_IMAGE_BACKEND: backend
  34. DOCKER_IMAGE_CELERYWORKER: gpuceleryworker
  35. DOCKER_IMAGE_FRONTEND: frontend
  36. DOMAIN: cloud.choozmo.com
  37. EMAILS_FROM_EMAIL: info@ai-anchor.com
  38. FIRST_SUPERUSER: admin@ai-anchor.com
  39. FIRST_SUPERUSER_PASSWORD: password
  40. FLOWER_BASIC_AUTH: admin:password
  41. LOCAL_VIDEO_STORAGE: local_storage/videos
  42. LOCAL_ZIP_STORAGE: local_storage/zips
  43. MEMBERSHIP_STATUS: '["normal", "infinite"]'
  44. PGADMIN_DEFAULT_EMAIL: admin@ai-anchor.com
  45. PGADMIN_DEFAULT_PASSWORD: password
  46. PGADMIN_LISTEN_PORT: '5050'
  47. POSTGRES_DB: app
  48. POSTGRES_PASSWORD: password
  49. POSTGRES_SERVER: db
  50. POSTGRES_USER: postgres
  51. PROGRESS_STATE: '["waiting", "processing", "completed", "failed"]'
  52. PROJECT_NAME: AI anchor
  53. SECRET_KEY: 1df1f2180c7b2550e76a8ccf5e67a76e5321d8c2d3fee4a725f8b80baf9a0c91
  54. SENTRY_DSN: ''
  55. SERVER_ADDRESS: http://localhost
  56. SERVER_HOST: http://cloud.choozmo.com
  57. SERVER_NAME: cloud.choozmo.com
  58. SMTP_HOST: smtp.gmail.com
  59. SMTP_PASSWORD: hlmaxzjnvpeaulhw
  60. SMTP_PORT: '587'
  61. SMTP_TLS: "True"
  62. SMTP_USER: verify@choozmo.com
  63. STACK_NAME: ai-anchor-com
  64. TRAEFIK_PUBLIC_NETWORK: traefik-public
  65. TRAEFIK_PUBLIC_TAG: traefik-public
  66. TRAEFIK_TAG: ai-anchor.com
  67. USERS_OPEN_REGISTRATION: "True"
  68. image: backend:cloud
  69. labels:
  70. traefik.constraint-label-stack: cloud.choozmo.com
  71. traefik.enable: "true"
  72. traefik.http.routers.ai-anchor-com-backend-http.rule: PathPrefix(`/api`) ||
  73. PathPrefix(`/docs`) || PathPrefix(`/redoc`)
  74. traefik.http.services.ai-anchor-com-backend.loadbalancer.server.port: '80'
  75. volumes:
  76. - /root/video-maker/backend/app:/app:rw
  77. - /backend_storage/videos:/app/backend_storage/videos:rw
  78. - /backend_storage/zips:/app/backend_storage/zips:rw
  79. frontend:
  80. build:
  81. args:
  82. FRONTEND_ENV: dev
  83. context: /root/video-maker/frontend
  84. deploy:
  85. labels:
  86. traefik.constraint-label-stack: cloud.choozmo.com
  87. traefik.enable: "true"
  88. traefik.http.routers.ai-anchor-com-frontend-http.rule: PathPrefix(`/`)
  89. traefik.http.services.ai-anchor-com-frontend.loadbalancer.server.port: '80'
  90. image: frontend:cloud
  91. labels:
  92. traefik.constraint-label-stack: cloud.choozmo.com
  93. traefik.enable: "true"
  94. traefik.http.routers.ai-anchor-com-frontend-http.rule: PathPrefix(`/`)
  95. traefik.http.services.ai-anchor-com-frontend.loadbalancer.server.port: '80'
  96. proxy:
  97. command:
  98. - --providers.docker
  99. - --providers.docker.constraints=Label(`traefik.constraint-label-stack`, `cloud.choozmo.com`)
  100. - --providers.docker.exposedbydefault=false
  101. - --accesslog
  102. - --log
  103. - --api
  104. - --api.insecure=true
  105. deploy:
  106. labels:
  107. traefik.constraint-label: traefik-public
  108. traefik.docker.network: traefik-public
  109. traefik.enable: "true"
  110. traefik.http.middlewares.ai-anchor-com-https-redirect.redirectscheme.permanent: "true"
  111. traefik.http.middlewares.ai-anchor-com-https-redirect.redirectscheme.scheme: https
  112. traefik.http.middlewares.ai-anchor-com-www-redirect.redirectregex.regex: ^https?://(www.)?(cloud.choozmo.com)/(.*)
  113. traefik.http.middlewares.ai-anchor-com-www-redirect.redirectregex.replacement: https://cloud.choozmo.com/$${3}
  114. traefik.http.routers.ai-anchor-com-proxy-http.entrypoints: http
  115. traefik.http.routers.ai-anchor-com-proxy-http.middlewares: ai-anchor-com-www-redirect,ai-anchor-com-https-redirect
  116. traefik.http.routers.ai-anchor-com-proxy-http.rule: Host(`cloud.choozmo.com`)
  117. || Host(`www.cloud.choozmo.com`)
  118. traefik.http.routers.ai-anchor-com-proxy-https.entrypoints: https
  119. traefik.http.routers.ai-anchor-com-proxy-https.middlewares: ai-anchor-com-www-redirect
  120. traefik.http.routers.ai-anchor-com-proxy-https.rule: Host(`cloud.choozmo.com`)
  121. || Host(`www.cloud.choozmo.com`)
  122. traefik.http.routers.ai-anchor-com-proxy-https.tls: "true"
  123. traefik.http.routers.ai-anchor-com-proxy-https.tls.certresolver: le
  124. traefik.http.services.ai-anchor-com-proxy.loadbalancer.server.port: '80'
  125. placement:
  126. constraints:
  127. - node.role == manager
  128. image: traefik:v2.9
  129. labels:
  130. traefik.enable: "true"
  131. traefik.http.routers.ai-anchor-com-traefik-public-http.rule: Host(`cloud.choozmo.com`)
  132. traefik.http.services.ai-anchor-com-traefik-public.loadbalancer.server.port: '80'
  133. networks:
  134. default: {}
  135. traefik-public: {}
  136. ports:
  137. - published: 80
  138. target: 80
  139. volumes:
  140. - /var/run/docker.sock:/var/run/docker.sock:rw
  141. version: '3.3'