feat(runtime): 정적 프런트엔드와 격리 빌더를 구성한다

Caddy가 불변 아티팩트를 직접 제공하고 runtime과 builder의 자원·비밀 경계를 분리한다.

Gateway active release ref를 재기동에 복원하고 production/development/smoke 모델 검증을 확장한다.
This commit is contained in:
2026-08-22 09:32:54 +00:00
parent d4af23c0d7
commit 6461ee5773
18 changed files with 759 additions and 38 deletions
+23
View File
@@ -25,3 +25,26 @@ test('Caddy caches only content-hashed Vite frontend assets as immutable', async
/header @immutableFrontendAssets >Cache-Control "public, max-age=31536000, immutable"/,
);
});
test('Caddy serves published frontend artifacts directly and keeps a transition fallback', async () => {
const caddyfile = await fs.readFile(new URL('../caddy/Caddyfile', import.meta.url), 'utf8');
for (const [profile, port] of Object.entries({
gateway: 15000,
che: 15002,
kwe: 15004,
pwe: 15006,
twe: 15008,
nya: 15010,
pya: 15012,
hwe: 15014,
})) {
assert.match(caddyfile, new RegExp(`/srv/frontend-artifacts/${profile}/current`));
assert.match(caddyfile, new RegExp(`reverse_proxy runtime:${port}`));
assert.match(
caddyfile,
new RegExp(`route \\{[\\s\\S]*?@${profile}Asset path /assets/\\*[\\s\\S]*?handle @${profile}Asset`),
);
}
assert.match(caddyfile, /try_files \{path\} \/index\.html/);
assert.match(caddyfile, /header @frontendRequests Cache-Control "no-cache"/);
});