Replace S3 storage with Docker-mounted filesystem

- Add Docker and Compose deployment with persistent HTML and Postgres volumes
- Remove AWS storage configuration and dependency
- Document local Docker setup and filesystem storage
This commit is contained in:
2026-08-22 00:39:53 -04:00 Verified
parent 75719cefc0
commit 8ac7db77fc
9 changed files with 136 additions and 79 deletions
+48
View File
@@ -0,0 +1,48 @@
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: postplan
POSTGRES_PASSWORD: postplan
POSTGRES_DB: postplan
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postplan -d postplan"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
app:
build: .
ports:
- "${PORT:-3000}:3000"
environment:
PORT: 3000
DATABASE_URL: postgres://postplan:postplan@db:5432/postplan
POSTPLAN_BOOTSTRAP_API_KEY: ${POSTPLAN_BOOTSTRAP_API_KEY:-dev-bootstrap-key}
POSTPLAN_HTML_DIR: /data/html
POSTPLAN_PUBLIC_BASE_URL: ${POSTPLAN_PUBLIC_BASE_URL:-http://localhost:3000}
POSTPLAN_SESSION_SECRET: ${POSTPLAN_SESSION_SECRET:-}
volumes:
- ${POSTPLAN_HTML_VOLUME:-./data/html}:/data/html
depends_on:
db:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/healthz').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
]
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
restart: unless-stopped
volumes:
postgres-data: