Deployment — vg.bloom-shield.com

Public URL: https://vg.bloom-shield.com/ (Cloudflare-proxied)

Request path

visitor → Cloudflare (proxied, orange cloud) → Apache2 :443 (Let's Encrypt) → 127.0.0.1:8090 (uvicorn)

The app binds loopback only. Apache is the sole public face; the origin IP never appears in this repo.

Pieces

What Where
App unit /etc/systemd/system/vehiclegenome.service (enabled, active)
App bind 127.0.0.1:8090 (uvicorn, app.main:app, 1 worker)
App env EnvironmentFile=/root/.hermes/.env
Vhost /etc/apache2/sites-available/vehiclegenome.conf (a2ensited)
Cert /etc/letsencrypt/live/vg.bloom-shield.com/ (expires 2027-03-02, auto-renew via certbot.timer)
Logs /var/log/apache2/vehiclegenome-{access,error}.log

The :80 vhost keeps /.well-known/acme-challenge/ on plain HTTP (Cloudflare passes it through) and redirects everything else to HTTPS. Do not remove that exemption — renewal fails silently ~60 days later if you do.

Rebuild / restart

systemctl restart vehiclegenome.service        # after any app change
systemctl reload apache2                       # after a vhost change (graceful, siblings unaffected)

The old ad-hoc run.sh (uvicorn on 0.0.0.0:8090 + a self-signed :8443) is retired — do not re-run it; it would fight the systemd unit for the port.

Sibling sites (do not disturb)

Verify both still answer 200 with unchanged body size after any Apache change.

Outage checklist

  1. systemctl status vehiclegenome / journalctl -u vehiclegenome -n 50
  2. ss -tln | grep :8090 → must read 127.0.0.1:8090
  3. curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8090/api/health → 200
  4. curl -sI https://vg.bloom-shield.com/ → 200 through Cloudflare
  5. apache2ctl configtest before any reload
  6. Cert: openssl x509 -enddate -noout -in /etc/letsencrypt/live/vg.bloom-shield.com/fullchain.pem