/docker-traefik

Traefik development environment for VEuPathDB BRC

Apache License 2.0Apache-2.0

docker-traefik

Traefik development environment for routing VEuPathDB BRC containers

This project contains a docker-compose.yml file to test routing Docker containers through Traefik. This environment is very similar to production web VEuPathDB BRC containers.

Quick Start

  1. Clone or directly download the docker-compose.yml

  2. Start Traefik's compose file: docker-compose up -d

  3. Specify Traefik's network as external in your compose file on the top-level networks key

networks:
  traefik:
    external: true
  1. Don't forget to reference Traefik's network on your web container's service-level networks key
    networks:
      - traefik
  1. Add Traefik labels for your web container replacing examplerouter with a unique router name. Note that the router name api is in use by Traefik itself. It is not a bad idea to be explicit on which port Traefik should use on your container even if port detection works.
    labels:
      traefik.http.routers.examplerouter.rule: Host(`www.example.org`)
      traefik.http.routers.examplerouter.entrypoints: websecure
      traefik.http.routers.examplerouter.tls: true
      traefik.http.services.examplerouter.loadbalancer.server.port: 80
      traefik.docker.network: traefik

Notes

License

License