config: update Caddyfile structure and add new documentation screenshots
All checks were successful
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m33s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 7m3s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m49s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m54s
All checks were successful
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m33s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 7m3s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m49s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m54s
- Simplified and refined the `Caddyfile` configuration for improved readability. - Added screenshots to `docs/ScreenShots` documenting proxy settings and production logs. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
parent
0ce94203fe
commit
9c2d34cc82
|
|
@ -1,64 +1,42 @@
|
|||
# Caddyfile
|
||||
|
||||
{
|
||||
# Global options
|
||||
auto_https off
|
||||
servers {
|
||||
metrics
|
||||
}
|
||||
}
|
||||
|
||||
# Define the site
|
||||
|
||||
app.mo-code.at:4000, :4000 {
|
||||
# Root directory for static files
|
||||
:4000 {
|
||||
# Root directory
|
||||
root * /usr/share/caddy
|
||||
|
||||
# Access Logs (JSON format for Docker)
|
||||
# Logging
|
||||
log {
|
||||
output stdout
|
||||
format json
|
||||
}
|
||||
|
||||
# Enable Gzip/Zstd compression
|
||||
# Compression
|
||||
encode gzip zstd
|
||||
|
||||
# Templates for runtime configuration (config.json)
|
||||
# Configuration Template
|
||||
templates {
|
||||
mime application/json
|
||||
}
|
||||
|
||||
# Cache Control for static assets (immutable)
|
||||
@static {
|
||||
file
|
||||
path *.js *.css *.png *.jpg *.svg *.wasm
|
||||
}
|
||||
header @static Cache-Control "public, max-age=31536000, immutable"
|
||||
# Static Assets
|
||||
file_server
|
||||
|
||||
# Security Headers
|
||||
header {
|
||||
Cross-Origin-Opener-Policy "same-origin"
|
||||
Cross-Origin-Embedder-Policy "require-corp"
|
||||
X-Content-Type-Options "nosniff"
|
||||
X-Frame-Options "DENY"
|
||||
Referrer-Policy "strict-origin-when-cross-origin"
|
||||
Permissions-Policy "camera=(), microphone=(), geolocation=()"
|
||||
}
|
||||
|
||||
# --- ROUTING LOGIC ---
|
||||
|
||||
# 1. API Proxy
|
||||
# API Proxy
|
||||
handle /api/* {
|
||||
reverse_proxy api-gateway:8081
|
||||
}
|
||||
|
||||
# 2. Health Check
|
||||
# Health
|
||||
handle /health {
|
||||
respond "healthy" 200
|
||||
}
|
||||
|
||||
# 3. Static Files & SPA Fallback
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
# SPA Routing (Last Resort)
|
||||
try_files {path} /index.html
|
||||
}
|
||||
|
|
|
|||
BIN
docs/ScreenShots/cloudflare-bestaetigung_2026-03-13_11-51.png
Normal file
BIN
docs/ScreenShots/cloudflare-bestaetigung_2026-03-13_11-51.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 122 KiB |
BIN
docs/ScreenShots/prod-docker-log-web-app_2026-03-13_12-20.png
Normal file
BIN
docs/ScreenShots/prod-docker-log-web-app_2026-03-13_12-20.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 276 KiB |
Loading…
Reference in New Issue
Block a user