local-docker-compose.override.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. version: "3.3"
  2. services:
  3. proxy:
  4. ports:
  5. - "10000: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. flower:
  29. ports:
  30. - "5555:5555"
  31. backend:
  32. volumes:
  33. - ./backend/app:/app
  34. - /${BACKEND_ZIP_STORAGE}:/app/${BACKEND_ZIP_STORAGE}
  35. - /${BACKEND_VIDEO_STORAGE}:/app/${BACKEND_VIDEO_STORAGE}
  36. environment:
  37. - SERVER_HOST=http://${DOMAIN?Variable not set}
  38. build:
  39. context: ./backend
  40. dockerfile: backend.dockerfile
  41. args:
  42. INSTALL_DEV: ${INSTALL_DEV-true}
  43. INSTALL_JUPYTER: ${INSTALL_JUPYTER-false}
  44. # command: bash -c "while true; do sleep 1; done" # Infinite loop to keep container live doing nothing
  45. command: /start-reload.sh
  46. labels:
  47. - traefik.enable=true
  48. - traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
  49. - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=PathPrefix(`/api`) || PathPrefix(`/docs`) || PathPrefix(`/redoc`)
  50. - traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=80
  51. gpuceleryworker:
  52. volumes:
  53. - ./backend/app:/app
  54. - /${CELERY_ZIP_STORAGE}:/${CELERY_ZIP_STORAGE}
  55. - /${CELERY_VIDEO_STORAGE}:/${CELERY_VIDEO_STORAGE}
  56. environment:
  57. - RUN=celery worker -A app.worker -l info -Q main-queue -c 1
  58. build:
  59. context: ./backend
  60. dockerfile: gpuceleryworker.dockerfile
  61. args:
  62. INSTALL_DEV: ${INSTALL_DEV-true}
  63. INSTALL_JUPYTER: ${INSTALL_JUPYTER-false}
  64. networks:
  65. traefik-public:
  66. # For local dev, don't expect an external Traefik network
  67. external: false