docker-compose.yml 985 B

1234567891011121314151617181920212223242526272829
  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. - --accesslog # http access log
  22. - --log #Traefik log, for configurations and errors
  23. - --api # Enable the Dashboard and API
  24. ports:
  25. - "8888:80"
  26. volumes:
  27. # Traefik must be able to listen for Docker events
  28. - /var/run/docker.sock:/var/run/docker.sock