choozmo-docker-compose.override.yml 2.6 KB

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