Some checks failed
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline is running
ci/woodpecker/push/bff Pipeline failed
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/frontend Pipeline is running
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/fx_oracle Pipeline failed
ci/woodpecker/push/bump_version unknown status
ci/woodpecker/push/fx_ingestor Pipeline failed
135 lines
3.1 KiB
Caddyfile
135 lines
3.1 KiB
Caddyfile
########################################
|
|
# Global options
|
|
########################################
|
|
{
|
|
email {$CADDY_ACME_EMAIL}
|
|
# debug
|
|
}
|
|
|
|
########################################
|
|
# Sendico site definition
|
|
########################################
|
|
(sendico_site) {
|
|
vars static_root /usr/share/pweb
|
|
|
|
encode zstd gzip
|
|
|
|
header {
|
|
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
|
|
}
|
|
|
|
route {
|
|
########################################
|
|
# Backend API
|
|
########################################
|
|
handle /api/v1/* {
|
|
# Proxy directly to the BFF container on the Docker network.
|
|
reverse_proxy sendico-bff:8081 {
|
|
health_uri /api/v1/health
|
|
health_interval 15s
|
|
health_timeout 4s
|
|
health_status 2xx
|
|
}
|
|
header Cache-Control "no-cache, no-store, must-revalidate"
|
|
header Pragma "no-cache"
|
|
header Expires "0"
|
|
}
|
|
|
|
########################################
|
|
# Static assets with tailored caching
|
|
########################################
|
|
handle /version.json {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "no-cache, no-store, must-revalidate"
|
|
header Pragma "no-cache"
|
|
header Expires "0"
|
|
}
|
|
|
|
handle /*.main.dart.js {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=3600"
|
|
}
|
|
|
|
handle /*.dart.js {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=3600"
|
|
}
|
|
|
|
handle /*.js {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=3600"
|
|
}
|
|
|
|
handle /assets/*.js {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=31536000, immutable"
|
|
}
|
|
|
|
handle /assets/*.css {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=31536000, immutable"
|
|
}
|
|
|
|
handle /assets/* {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=31536000, immutable"
|
|
}
|
|
|
|
handle /canvaskit/* {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=86400"
|
|
}
|
|
|
|
handle /icons/* {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=86400"
|
|
}
|
|
|
|
handle /*.html {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=3600"
|
|
}
|
|
|
|
handle /*.css {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=3600"
|
|
}
|
|
|
|
handle /*.json {
|
|
root * {vars.static_root}
|
|
file_server
|
|
header Cache-Control "public, max-age=3600"
|
|
}
|
|
|
|
########################################
|
|
# SPA fallback
|
|
########################################
|
|
handle {
|
|
root * {vars.static_root}
|
|
try_files {path} /index.html
|
|
file_server
|
|
header Cache-Control "no-cache, no-store, must-revalidate"
|
|
header Pragma "no-cache"
|
|
header Expires "0"
|
|
}
|
|
}
|
|
}
|
|
|
|
########################################
|
|
# Main site
|
|
########################################
|
|
{$SERVICE_HOST} {
|
|
import sendico_site
|
|
}
|