docker-compose.override.yml 3.1 KB

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