Public-cloud deployment of a single-user expense tracker: - 4-container stack: Caddy (HTTPS via Let's Encrypt), nginx (React/Vite SPA), Express API, Postgres 16 - Repeatable deployment via prepare-app.sh using only OCI CLI (no web console) - Persistent Postgres volume, auto-restart policies, healthchecks, backup + restore scripts - DuckDNS dynamic DNS for the public hostname; secrets isolated to gitignored .env Author: Gigi Saji Live URL: https://savesave.duckdns.org
32 lines
530 B
Caddyfile
32 lines
530 B
Caddyfile
{
|
|
email {$LE_EMAIL}
|
|
admin off
|
|
}
|
|
|
|
{$DUCKDNS_DOMAIN} {
|
|
encode zstd gzip
|
|
|
|
# API requests go to the Express backend
|
|
handle /api/* {
|
|
reverse_proxy backend:3000
|
|
}
|
|
|
|
handle /health {
|
|
reverse_proxy backend:3000
|
|
}
|
|
|
|
# Everything else is the static frontend
|
|
handle {
|
|
reverse_proxy frontend:80
|
|
}
|
|
|
|
log {
|
|
output file /var/log/caddy/access.log {
|
|
roll_size 10mb
|
|
roll_keep 5
|
|
roll_keep_for 720h
|
|
}
|
|
format json
|
|
}
|
|
}
|