I’ve been working on using docker more in my workflow. I wanted to start incorporating Traefik into my containers that I have been using instead of utilizing unique IP addresses. Earlier I got the following code working but when I go to any valid URL like http://localhost/ignition/app/home on edge or Firefox I get “Browser Not Supported” even though I can open the link if I use http://localhost:8088/app/home just fine.
Has anyone else run into this yet?
services:
traefik:
image: traefik:v2.10
container_name: traefik
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080" # Traefik dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik-net
ignition:
image: inductiveautomation/ignition:8.3
container_name: ignition
ports:
- "8088:8088" # Gateway web interface
- "8043:8043" # Gateway SSL
environment:
- ACCEPT_IGNITION_EULA=Y
- GATEWAY_ADMIN_USERNAME=admin
- GATEWAY_ADMIN_PASSWORD=password
- IGNITION_EDITION=standard
volumes:
- ignition-data:/usr/local/bin/ignition/data
labels:
- "traefik.enable=true"
# 1. Match all paths starting with /ignition
- "traefik.http.routers.ignition.rule=PathPrefix(`/ignition`)"
- "traefik.http.routers.ignition.entrypoints=web"
- "traefik.http.services.ignition.loadbalancer.server.port=8088"
# 2. Define the middleware to strip the prefix
- "traefik.http.middlewares.ignition-stripprefix.stripprefix.prefixes=/ignition"
# 3. APPLY the middleware to the router
- "traefik.http.routers.ignition.middlewares=ignition-stripprefix"
networks:
- traefik-net
networks:
traefik-net:
driver: bridge
volumes:
ignition-data: