choozmo-docker-compose.override.yml 2.4 KB

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