cloud-docker-compose.override.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. version: "3.3"
  2. services:
  3. proxy:
  4. ports:
  5. - "80:80"
  6. command:
  7. # Enable Docker in Traefik, so that it reads labels from Docker services
  8. - --providers.docker
  9. # Add a constraint to only use services with the label for this stack
  10. # from the env var TRAEFIK_TAG
  11. - --providers.docker.constraints=Label(`traefik.constraint-label-stack`, `${TRAEFIK_TAG?Variable not set}`)
  12. # Do not expose all Docker services, only the ones explicitly exposed
  13. - --providers.docker.exposedbydefault=false
  14. # Disable Docker Swarm mode for local development
  15. # - --providers.docker.swarmmode
  16. # Enable the access log, with HTTP requests
  17. - --accesslog
  18. # Enable the Traefik log, for configurations and errors
  19. - --log
  20. # Enable the Dashboard and API
  21. - --api
  22. # Enable the Dashboard and API in insecure mode for local development
  23. - --api.insecure=true
  24. labels:
  25. - traefik.enable=true
  26. - traefik.http.routers.${STACK_NAME?Variable not set}-traefik-public-http.rule=Host(`${DOMAIN?Variable not set}`)
  27. - traefik.http.services.${STACK_NAME?Variable not set}-traefik-public.loadbalancer.server.port=80
  28. backend:
  29. volumes:
  30. - ./backend/app:/app
  31. - /${BACKEND_ZIP_STORAGE}:/app/${BACKEND_ZIP_STORAGE}
  32. - /${BACKEND_VIDEO_STORAGE}:/app/${BACKEND_VIDEO_STORAGE}
  33. environment:
  34. - SERVER_HOST=http://${DOMAIN?Variable not set}
  35. build:
  36. context: ./backend
  37. dockerfile: backend.dockerfile
  38. args:
  39. INSTALL_DEV: ${INSTALL_DEV-true}
  40. INSTALL_JUPYTER: ${INSTALL_JUPYTER-false}
  41. # command: bash -c "while true; do sleep 1; done" # Infinite loop to keep container live doing nothing
  42. command: /start-reload.sh
  43. labels:
  44. - traefik.enable=true
  45. - traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
  46. - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/api`) || PathPrefix(`/docs`) || PathPrefix(`/redoc`)
  47. - traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=80
  48. frontend:
  49. build:
  50. context: ./frontend
  51. args:
  52. FRONTEND_ENV: dev
  53. labels:
  54. - traefik.enable=true
  55. - traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
  56. - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=PathPrefix(`/`)
  57. - traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80
  58. networks:
  59. traefik-public:
  60. # For local dev, don't expect an external Traefik network
  61. external: true