Record the first droplet deployment; align deploy files with what ran
Documentation and deployment examples only; no application code changed. The systemd unit and Caddyfile now match what is running on the droplet, and docs/evidence/droplet/2026-11-21.md records the changes made and the checks performed. No device or phone evidence. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,28 @@
|
||||
# Caddy terminates TLS (certificates are obtained automatically) and forwards to the bridge
|
||||
# on loopback. Replace the hostname. Example only: not yet run on a droplet.
|
||||
# Caddy terminates TLS (certificates are obtained automatically), forwards the bridge API to
|
||||
# loopback, and serves the built phone page from the same origin. Replace the hostname.
|
||||
# This is the shape running on the first droplet deployment (2026-11-21).
|
||||
bridge.example.com {
|
||||
encode zstd gzip
|
||||
# Audio uploads are at most about 1 MB at the default 30 s cap.
|
||||
request_body {
|
||||
max_size 2MB
|
||||
header {
|
||||
Strict-Transport-Security "max-age=31536000"
|
||||
X-Content-Type-Options "nosniff"
|
||||
Referrer-Policy "no-referrer"
|
||||
-Server
|
||||
}
|
||||
|
||||
# Bridge API. Audio uploads are at most about 1 MB at the default 30 s cap.
|
||||
@api path /v1/* /healthz
|
||||
handle @api {
|
||||
request_body {
|
||||
max_size 2MB
|
||||
}
|
||||
reverse_proxy 127.0.0.1:8787
|
||||
}
|
||||
|
||||
# The built client (apps/even-client/dist). Static files, no secrets. Serving it from the
|
||||
# bridge's own origin means the page needs no CORS allowance.
|
||||
handle {
|
||||
root * /opt/hermeven/www
|
||||
file_server
|
||||
}
|
||||
reverse_proxy 127.0.0.1:8787
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# systemd unit for the Hermeven bridge. Example only: it has not been run on a droplet yet.
|
||||
# systemd unit for the Hermeven bridge. This is the unit running on the first droplet
|
||||
# deployment (2026-11-21); see docs/evidence/droplet/2026-11-21.md.
|
||||
# Install: copy to /etc/systemd/system/, adjust paths, then
|
||||
# systemctl daemon-reload && systemctl enable --now hermeven-bridge
|
||||
[Unit]
|
||||
@@ -10,10 +11,13 @@ Wants=network-online.target
|
||||
Type=simple
|
||||
User=hermeven
|
||||
Group=hermeven
|
||||
WorkingDirectory=/opt/hermeven
|
||||
WorkingDirectory=/opt/hermeven/app/services/bridge
|
||||
# Secrets live here, mode 600, owned by the service user. Never in the repository.
|
||||
Environment=HERMEVEN_ENV_FILE=/etc/hermeven/bridge.env
|
||||
ExecStart=/usr/bin/npm run --silent bridge
|
||||
# Node is started directly rather than through `npm run`: npm wants a writable home
|
||||
# directory for its logs, and the service's file system is read-only.
|
||||
Environment=HOME=/var/lib/hermeven
|
||||
ExecStart=/opt/node/bin/node --import tsx src/main.ts
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
# In-flight turns are recovered from SQLite on the next start.
|
||||
|
||||
Reference in New Issue
Block a user