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:
agent 2026-10-09 20:45:28 +00:00
parent 41b3487a5a
commit 1382e53359
9 changed files with 31 additions and 21 deletions

49
compose.yaml Normal file
View file

@ -0,0 +1,49 @@
# podman compose up -d --build (run from the repo root; 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 .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:
- ./deploy/Caddyfile:/etc/caddy/Caddyfile:ro,Z
- caddy-data:/data
- caddy-config:/config
volumes:
oweme-data:
caddy-data:
caddy-config: