Skip to content

Commit

Permalink
Update Traefik version and configuration
Browse files Browse the repository at this point in the history
Switched the Traefik container image to version v3.2 to utilize updates in the latest release. Enabled the insecure dashboard mode for testing purposes. Added a port mapping for the Web UI to allow access. Updated environment variables to consistent names, ensuring more readable and maintainable configuration. Recognize these changes may pose security risks if used in production without adjustments.

Issue: #123
  • Loading branch information
yousecjoe committed Oct 7, 2024
1 parent 7979f24 commit 76d6a11
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/docker/containers/traefik/data/traefik-chainguard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## traefik.yml


# API and dashboard configuration. DO NOT RUN IN PROD
api:
insecure: true

1 change: 1 addition & 0 deletions src/docker/containers/traefik/data/traefik.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
api:
dashboard: true
insecure: true
debug: true
entryPoints:
http:
Expand Down
11 changes: 7 additions & 4 deletions src/docker/containers/traefik/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
traefik:
image: cgr.dev/chainguard/traefik:latest
#image: cgr.dev/chainguard/traefik:latest
image: traefik:v3.2
container_name: traefik
restart: unless-stopped
security_opt:
Expand All @@ -9,7 +10,8 @@ services:
macvlan255:
ipv4_address: 10.0.255.8
ports:
- 80:80 # For HTTP (usually serves HTTP/1.1 traffic)
- 80:80 # For HTTP (usually serves HTTP/1.1 traffic)
- 8080:8080 # Web UI
- 443:443/tcp # For HTTPS (HTTP/2 or fallback to HTTP/1.1 via TLS over TCP)
- 443:443/udp # For HTTP/3 (which runs over QUIC using UDP)
environment:
Expand All @@ -25,6 +27,7 @@ services:
- ./data/traefik.yml:/traefik.yml:ro
- ./data/acme.json:/acme.json
# - ./data/config.yml:/config.yml:ro
#user: "${RUNAS_USER_AND_GROUP}"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http"
Expand All @@ -34,12 +37,12 @@ services:
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=${_SECURE_RULE}"
- "traefik.http.routers.traefik-secure.rule=${TRAEFIK_HTTP_ROUTERS_TRAEFIK_SECURE_RULE}"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=${TRAEFIK_HTTP_ROUTERS_TRAEFIK_SECURE_TLS_CERTRESOLVER}"
- "traefik.http.routers.traefik-secure.tls.domains[0].main=${TRAEFIK_HTTP_ROUTERS_TRAEFIK_SECURE_TLS_DOMAINS_0_MAIN}"
- "traefik.http.routers.traefik-secure.tls.domains[0].sans=${TRAEFIK_HTTP_ROUTERS_TRAEFIK-SECURE_TLS_DOMAINS_0_SANS}"
- "traefik.http.routers.traefik-secure.tls.domains[0].sans=${TRAEFIK_HTTP_ROUTERS_TRAEFIK_SECURE_TLS_DOMAINS_0_SANS}"
- "traefik.http.routers.traefik-secure.service=${TRAEFIK_HTTP_ROUTERS_TRAEFIK_SECURE_SERVICE}"

secrets:
Expand Down

0 comments on commit 76d6a11

Please sign in to comment.