cloud-docker-compose.override.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. frontend:
  30. build:
  31. context: ./frontend
  32. args:
  33. FRONTEND_ENV: dev
  34. labels:
  35. - traefik.enable=true
  36. - traefik.constraint-label-stack=${TRAEFIK_TAG?Variable not set}
  37. - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=PathPrefix(`/`)
  38. - traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80
  39. networks:
  40. traefik-public:
  41. # For local dev, don't expect an external Traefik network
  42. external: false