1
Deployment
nmemmert edited this page 2026-09-03 17:05:26 -04:00

Deployment

CI Pipeline (Gitea Actions)

Pushing to main triggers .github/workflows/publish.yml:

  1. Checks out code
  2. Installs dependencies (npm ci)
  3. Runs npm run build (Vite)
  4. Logs into Gitea Container Registry
  5. Builds and pushes a multi-arch image (amd64 + arm64) tagged latest + short SHA

Image: git.necloud.us/nate/siteforge:latest

Servers

Rocky (Beta)

Podman on ZimaOS NAS, reachable over Tailscale.

podman run -d --name siteforge-app \
    --restart unless-stopped \
    -p 4173:4173 \
    --env-file /mnt/raid/siteforge/.env \
    --mount type=bind,source=/mnt/raid/siteforge/data,target=/app/data,Z \
    git.necloud.us/nate/siteforge:latest

Oracle Arm (Production)

Docker on Oracle Cloud free-tier ARM instance.

docker pull git.necloud.us/nate/siteforge:latest

docker rm -f siteforge-app

docker run -d --name siteforge-app \
    --restart unless-stopped \
    -p 4173:4173 \
    --env-file /home/opc/siteforge/.env \
    --mount type=bind,source=/home/opc/siteforge/data,target=/app/data \
    git.necloud.us/nate/siteforge:latest

docker ps

Environment Variables (.env)

Variable Description
ADMIN_PASSWORD Password for /admin — change from default changeme
PORT Server port (default 4173)
TRUST_PROXY_HOPS Number of reverse-proxy hops to trust (default 1)
RESEND_API_KEY Resend API key for transactional email
FROM_EMAIL Sender address for study emails

Data Directory

The data/ bind mount is the only stateful piece. Upgrading is safe — pull the new image and restart. The data directory is never modified by the container build.

To back up: copy the entire data/ directory from the host.

Service Worker Cache Note

After a deploy, users may see the old version until the Workbox service worker refreshes. Force-clear it in the browser console:

const regs = await navigator.serviceWorker.getRegistrations()
for (const r of regs) await r.unregister()
location.reload()