feat(runtime): 정적 프런트엔드와 격리 빌더를 구성한다
Caddy가 불변 아티팩트를 직접 제공하고 runtime과 builder의 자원·비밀 경계를 분리한다. Gateway active release ref를 재기동에 복원하고 production/development/smoke 모델 검증을 확장한다.
This commit is contained in:
+147
-1
@@ -7,13 +7,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
{$SITE_ADDRESS} {
|
||||
{$SITE_ADDRESS}, http://caddy {
|
||||
encode zstd gzip
|
||||
|
||||
# Vite emits content-hashed files below each frontend's assets directory.
|
||||
# Defer this header so it replaces vite preview's default no-cache value.
|
||||
@immutableFrontendAssets path_regexp immutableFrontendAssets ^/(gateway|che|kwe|pwe|twe|nya|pya|hwe)/assets/.+-[A-Za-z0-9_-]{8}\.[^/]+$
|
||||
header @immutableFrontendAssets >Cache-Control "public, max-age=31536000, immutable"
|
||||
@frontendRequests path /gateway/* /che/* /kwe/* /pwe/* /twe/* /nya/* /pya/* /hwe/*
|
||||
header @frontendRequests Cache-Control "no-cache"
|
||||
|
||||
redir /gateway /gateway/ 308
|
||||
redir /che /che/ 308
|
||||
@@ -41,6 +43,24 @@
|
||||
reverse_proxy runtime:15001
|
||||
}
|
||||
handle /gateway/* {
|
||||
@gatewayPublished file {
|
||||
root /srv/frontend-artifacts/gateway/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @gatewayPublished {
|
||||
route {
|
||||
uri strip_prefix /gateway
|
||||
root * /srv/frontend-artifacts/gateway/current
|
||||
@gatewayAsset path /assets/*
|
||||
handle @gatewayAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15000
|
||||
}
|
||||
|
||||
@@ -48,42 +68,168 @@
|
||||
reverse_proxy runtime:15003
|
||||
}
|
||||
handle /che/* {
|
||||
@chePublished file {
|
||||
root /srv/frontend-artifacts/che/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @chePublished {
|
||||
route {
|
||||
uri strip_prefix /che
|
||||
root * /srv/frontend-artifacts/che/current
|
||||
@cheAsset path /assets/*
|
||||
handle @cheAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15002
|
||||
}
|
||||
handle /kwe/api/* {
|
||||
reverse_proxy runtime:15005
|
||||
}
|
||||
handle /kwe/* {
|
||||
@kwePublished file {
|
||||
root /srv/frontend-artifacts/kwe/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @kwePublished {
|
||||
route {
|
||||
uri strip_prefix /kwe
|
||||
root * /srv/frontend-artifacts/kwe/current
|
||||
@kweAsset path /assets/*
|
||||
handle @kweAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15004
|
||||
}
|
||||
handle /pwe/api/* {
|
||||
reverse_proxy runtime:15007
|
||||
}
|
||||
handle /pwe/* {
|
||||
@pwePublished file {
|
||||
root /srv/frontend-artifacts/pwe/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @pwePublished {
|
||||
route {
|
||||
uri strip_prefix /pwe
|
||||
root * /srv/frontend-artifacts/pwe/current
|
||||
@pweAsset path /assets/*
|
||||
handle @pweAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15006
|
||||
}
|
||||
handle /twe/api/* {
|
||||
reverse_proxy runtime:15009
|
||||
}
|
||||
handle /twe/* {
|
||||
@twePublished file {
|
||||
root /srv/frontend-artifacts/twe/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @twePublished {
|
||||
route {
|
||||
uri strip_prefix /twe
|
||||
root * /srv/frontend-artifacts/twe/current
|
||||
@tweAsset path /assets/*
|
||||
handle @tweAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15008
|
||||
}
|
||||
handle /nya/api/* {
|
||||
reverse_proxy runtime:15011
|
||||
}
|
||||
handle /nya/* {
|
||||
@nyaPublished file {
|
||||
root /srv/frontend-artifacts/nya/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @nyaPublished {
|
||||
route {
|
||||
uri strip_prefix /nya
|
||||
root * /srv/frontend-artifacts/nya/current
|
||||
@nyaAsset path /assets/*
|
||||
handle @nyaAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15010
|
||||
}
|
||||
handle /pya/api/* {
|
||||
reverse_proxy runtime:15013
|
||||
}
|
||||
handle /pya/* {
|
||||
@pyaPublished file {
|
||||
root /srv/frontend-artifacts/pya/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @pyaPublished {
|
||||
route {
|
||||
uri strip_prefix /pya
|
||||
root * /srv/frontend-artifacts/pya/current
|
||||
@pyaAsset path /assets/*
|
||||
handle @pyaAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15012
|
||||
}
|
||||
handle /hwe/api/* {
|
||||
reverse_proxy runtime:15015
|
||||
}
|
||||
handle /hwe/* {
|
||||
@hwePublished file {
|
||||
root /srv/frontend-artifacts/hwe/current
|
||||
try_files /index.html
|
||||
}
|
||||
handle @hwePublished {
|
||||
route {
|
||||
uri strip_prefix /hwe
|
||||
root * /srv/frontend-artifacts/hwe/current
|
||||
@hweAsset path /assets/*
|
||||
handle @hweAsset {
|
||||
file_server
|
||||
}
|
||||
handle {
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
}
|
||||
}
|
||||
reverse_proxy runtime:15014
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user