Add podman compose deployment, dev script and docs
Containerfile + compose (app + Caddy with automatic HTTPS), env-driven domain/limits/ports, VAPID key generation that never prints the key. SPEC updated to match the implementation (Node stdlib server, Svelte SPA, revert by event id, backup contents, push options). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013FYo6JSV1fDU1fm3LU77iF
This commit is contained in:
parent
a78d855886
commit
8c4e37ce4b
9 changed files with 365 additions and 42 deletions
49
deploy/compose.yaml
Normal file
49
deploy/compose.yaml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# podman compose up -d --build (run from this directory; reads ./.env)
|
||||
# See deploy/README.md for the full deploy steps.
|
||||
name: oweme
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: deploy/Containerfile
|
||||
image: localhost/oweme:latest
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
# fixed inside the container; everything else comes from .env
|
||||
HOST: 0.0.0.0
|
||||
PORT: "8080"
|
||||
DATA_DIR: /data
|
||||
STATIC_DIR: /app/web
|
||||
TRUST_PROXY: "1"
|
||||
volumes:
|
||||
- oweme-data:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/api/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
# no published ports: only Caddy can reach the app
|
||||
|
||||
caddy:
|
||||
image: docker.io/library/caddy:2.10.2-alpine
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- app
|
||||
environment:
|
||||
DOMAIN: ${DOMAIN:?set DOMAIN in deploy/.env}
|
||||
ports:
|
||||
# BIND_ADDR defaults to all interfaces (a public VPS). Rootless Podman
|
||||
# can't bind ports below 1024 by default; see README "Ports".
|
||||
- "${BIND_ADDR:-0.0.0.0}:${HTTP_PORT:-80}:80"
|
||||
- "${BIND_ADDR:-0.0.0.0}:${HTTPS_PORT:-443}:443"
|
||||
- "${BIND_ADDR:-0.0.0.0}:${HTTPS_PORT:-443}:443/udp"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro,Z
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
|
||||
volumes:
|
||||
oweme-data:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
Loading…
Add table
Add a link
Reference in a new issue