diff --git a/traefik/docker-compose.yml b/traefik/docker-compose.yml new file mode 100644 index 0000000..9e701ed --- /dev/null +++ b/traefik/docker-compose.yml @@ -0,0 +1,31 @@ +version: '3' + +services: + traefik: + image: traefik + restart: always + container_name: "traefik" + # Enables the web UI and tells Traefik to listen to docker + ports: + # The HTTP port + - "80:80" + # - "443:443" + # The Web UI (enabled by --api.insecure=true) + - "8080:8080" + volumes: + # So that Traefik can listen to the Docker events + - "/var/run/docker.sock:/var/run/docker.sock" + - "./traefik.yml:/traefik.yml" + # - "./acme.json:/acme.json" + labels: + - "traefik.enable=true" + ## HTTP REDIRECT + # - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" + # - "traefik.http.routers.redirect-https.rule=hostregexp(`{host:.+}`)" + # - "traefik.http.routers.redirect-https.entrypoints=insecure" + # - "traefik.http.routers.redirect-https.middlewares=redirect-to-https" + +networks: + default: + external: + name: $DEFAULT_NETWORK