Deployment
qast includes a built-in web server that serves the public site, documentation portal, and local admin UI from one process. The same assets can be deployed to Google Cloud Run for public hosting.
Local server
qast-ui --host 0.0.0.0 --port 8787
Routes
| Route | Content | Notes |
|---|---|---|
/ | Public site | Production target: qast.nuts.services |
/docs | Documentation portal | All docs pages |
/admin | Local admin UI | Keep local-only or behind auth |
/api/health | Health check | Returns {"ok": true} |
/api/ui-targets | Route metadata | Available UI endpoints |
Cloud Run deployment
The ui/ directory contains everything needed to deploy the site to Google Cloud Run:
Dockerfile— nginx:alpine serving static filesnginx.conf— SPA routing, caching, security headersdeploy.sh— automated deployment script
Deploy
# From the ui/ directory
cd ui
bash deploy.sh
The script will:
- Set the GCP project (
gnosis-459403) - Enable required APIs (Cloud Run, Cloud Build, Artifact Registry)
- Build and push the container via Cloud Build
- Deploy to Cloud Run (128 Mi, 0–3 instances, unauthenticated)
Service configuration
| Setting | Value |
|---|---|
| Service name | qast-site |
| Region | us-central1 |
| Memory | 128 Mi |
| CPU | 1 |
| Min instances | 0 (scales to zero) |
| Max instances | 3 |
| Port | 8080 |
| Auth | Unauthenticated (public) |
Custom domain
After deployment, map the custom domain:
gcloud run domain-mappings create \
--service qast-site \
--domain qast.nuts.services \
--region us-central1
Then add a DNS CNAME record:
CNAME qast.nuts.services → ghs.googlehosted.com.
SSL certificate provisioning is automatic and takes 15–30 minutes.
Production notes
- Route
/and/docsto the public domain (qast.nuts.services). - Keep
/adminlocal-only or behind VPN/auth. - The nginx container is ~7 MB and starts in under 1 second.
- Cloud Run scales to zero when idle — no cost when not serving traffic.
Created by Rich LeGrand · MIT License