flow diagrams

This commit is contained in:
cpu
2025-03-27 20:17:35 +01:00
parent c89eaacd42
commit 2da6061795
14 changed files with 479 additions and 271 deletions

View File

@@ -1,29 +1,32 @@
# Traefik v3 Labels for flic-webhook-webpush service
# Enable Traefik for this container
traefik.enable=true
# --- HTTP Router Definition ---
# Define an HTTP router named 'flic-webhook-http'
# Route requests based on Host and PathPrefix
traefik.http.routers.flic-webhook.rule=Host(`webpush.virtonline.eu`)
# Specify the entrypoint (e.g., 'websecure' for HTTPS)
traefik.http.routers.flic-webhook.entrypoints=websecure
# Specify the TLS certificate resolver
traefik.http.routers.flic-webhook.tls.certresolver=default
# Link this router to the service defined below
traefik.http.routers.flic-webhook.service=flic-webhook
# Docker Network
traefik.docker.network=traefik
# --- HTTP Service Definition ---
# Define an HTTP service named 'flic-webhook'
# Point the service to the container's port (default 3000)
traefik.http.services.flic-webhook.loadbalancer.server.port=3000
# Route requests based on Host
traefik.http.routers.flic-webhook-webpush.rule=Host(`webpush.virtonline.eu`)
# Specify the entrypoint ('websecure' for HTTPS)
traefik.http.routers.flic-webhook-webpush.entrypoints=web-secure
traefik.http.routers.flic-webhook-webpush.tls=true
traefik.http.routers.flic-webhook-webpush.tls.certResolver=default
# Link the router to the service defined below
traefik.http.routers.flic-webhook-webpush.service=flic-webhook-webpush
# --- Middleware (Optional Example: Rate Limiting - Uncomment to enable) ---
# traefik.http.middlewares.flic-ratelimit.ratelimit.average=10 # requests per second
# traefik.http.middlewares.flic-ratelimit.ratelimit.burst=20
# traefik.http.routers.flic-webhook.middlewares=flic-ratelimit
# Point the service to the container's port
traefik.http.services.flic-webhook-webpush.loadbalancer.server.port=3000
# --- Docker Network ---
# Ensure Traefik uses the correct network to communicate with the container
traefik.docker.network=traefik
# Middleware CORS
traefik.http.middlewares.cors-headers.headers.accesscontrolallowmethods=POST,GET
traefik.http.middlewares.cors-headers.headers.accesscontrolalloworiginlist=https://game-timer.virtonline.eu
traefik.http.middlewares.cors-headers.headers.accesscontrolallowheaders=Content-Type,Authorization,button-name,button-battery-level,timestamp
traefik.http.middlewares.cors-headers.headers.accesscontrolallowcredentials=true
traefik.http.middlewares.cors-headers.headers.accesscontrolmaxage=600
traefik.http.middlewares.cors-headers.headers.addvaryheader=true
# Middleware Rate Limiting
traefik.http.middlewares.flic-ratelimit.ratelimit.average=10
traefik.http.middlewares.flic-ratelimit.ratelimit.burst=20
# Apply both middlewares to the router (comma-separated list)
traefik.http.routers.flic-webhook-webpush.middlewares=cors-headers,flic-ratelimit