Move compose.yaml and .env.example to the repo root
Deploy is now `podman compose up -d` from the root. Add .containerignore so node_modules, local data and .env stay out of the build context, and mount only .env (not the whole tree) when generating VAPID keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FYo6JSV1fDU1fm3LU77iF
This commit is contained in:
parent
41b3487a5a
commit
1382e53359
9 changed files with 31 additions and 21 deletions
11
SPEC.md
11
SPEC.md
|
|
@ -496,7 +496,8 @@ Repo layout (monorepo):
|
|||
apps/web Svelte client + service worker
|
||||
apps/server Node API (no dependencies)
|
||||
packages/core shared: types, event schema, money math, replay, settle-up, recurring, stats, CSV
|
||||
deploy/ Containerfile, compose.yaml, Caddyfile, .env.example, README
|
||||
compose.yaml podman compose deployment (with .env.example)
|
||||
deploy/ Containerfile, Caddyfile, README
|
||||
e2e/ Playwright tests
|
||||
```
|
||||
|
||||
|
|
@ -504,7 +505,7 @@ e2e/ Playwright tests
|
|||
|
||||
## 13. Deployment (VPS, podman compose)
|
||||
|
||||
`deploy/compose.yaml` runs two services:
|
||||
`compose.yaml` (repo root) runs two services:
|
||||
|
||||
- `app`: the Node server, which also serves the built static client. Listens
|
||||
on the internal network only.
|
||||
|
|
@ -516,7 +517,7 @@ Volumes: `oweme-data` (SQLite + blobs), `caddy-data` (certificates).
|
|||
Deploy steps (documented in `deploy/README.md`):
|
||||
|
||||
1. Point a DNS A/AAAA record at the VPS.
|
||||
2. `cp deploy/.env.example deploy/.env && chmod 600 deploy/.env`, then set
|
||||
2. `cp .env.example .env && chmod 600 .env`, then set
|
||||
`DOMAIN` (e.g. `oweme.example.com`); Caddy uses it for the site address
|
||||
and certificate. (The app itself needs no domain: share links use the
|
||||
page's own origin and the CSP is `'self'`.) Generate VAPID keys with
|
||||
|
|
@ -525,11 +526,11 @@ Deploy steps (documented in `deploy/README.md`):
|
|||
3. Rootless Podman cannot bind ports < 1024 by default: either set
|
||||
`net.ipv4.ip_unprivileged_port_start=80` via sysctl, or publish 8080/8443 and
|
||||
redirect with the firewall — both documented.
|
||||
4. `cd deploy && podman compose up -d`. Updates: `git pull && podman compose up -d --build`.
|
||||
4. `podman compose up -d` from the repo root. Updates: `git pull && podman compose up -d --build`.
|
||||
5. Backups: copy the data volume. All contents are already encrypted, so
|
||||
backups can be stored anywhere.
|
||||
|
||||
Environment variables (`deploy/.env`, read by `compose.yaml`):
|
||||
Environment variables (`.env`, read by `compose.yaml`):
|
||||
|
||||
| Variable | Required | Default | Purpose |
|
||||
|---|---|---|---|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue