19 lines
399 B
Caddyfile
19 lines
399 B
Caddyfile
|
|
# Caddyfile — single-container (caddy + node)
|
||
|
|
# Caddy serves built frontend, proxies /api + /ws to node backend on :4001.
|
||
|
|
# Node never exposed directly; only caddy on :80.
|
||
|
|
|
||
|
|
:80 {
|
||
|
|
handle /api/* {
|
||
|
|
reverse_proxy 127.0.0.1:4001
|
||
|
|
}
|
||
|
|
handle /ws {
|
||
|
|
reverse_proxy 127.0.0.1:4001
|
||
|
|
}
|
||
|
|
# catch-all: static frontend (SPA fallback)
|
||
|
|
handle {
|
||
|
|
root * /srv
|
||
|
|
try_files {path} /index.html
|
||
|
|
file_server
|
||
|
|
}
|
||
|
|
}
|