docker-compose.yml 1013 B

123456789101112131415161718192021222324252627282930
  1. services:
  2. app:
  3. build:
  4. context: ./
  5. dockerfile: development.dockerfile
  6. ports:
  7. - 80:8080
  8. volumes:
  9. - ./:/app
  10. labels:
  11. - traefik.http.routers.app.rule=PathPrefix(`/app`)
  12. - traefik.http.services.app.loadbalancer.server.port=8080
  13. - traefik.http.middlewares.app-prefix.stripprefix.prefixes=/app
  14. - traefik.http.middlewares.app-prefix.stripprefix.forceSlash=false # see https://doc.traefik.io/traefik/middlewares/stripprefix/#forceslash
  15. - traefik.http.routers.app.middlewares=app-prefix
  16. # setup a proxy to test hosting on a sub-path; here localhost:8080/app
  17. proxy:
  18. image: traefik:v2.3
  19. command:
  20. - --providers.docker
  21. - --api.insecure=true
  22. - --accesslog # http access log
  23. - --log #Traefik log, for configurations and errors
  24. - --api # Enable the Dashboard and API
  25. ports:
  26. - "8888:80"
  27. volumes:
  28. # Traefik must be able to listen for Docker events
  29. - /var/run/docker.sock:/var/run/docker.sock