services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: shunt
POSTGRES_PASSWORD: shunt
POSTGRES_DB: shunt
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U shunt"]
interval: 5s
timeout: 5s
retries: 5
relay:
build: .
restart: unless-stopped
ports:
- "3001:3001"
environment:
DATABASE_URL: postgres://shunt:shunt@postgres:5432/shunt
RELAY_TOKEN: ${RELAY_TOKEN:-change-me}
PORT: 3001
RETENTION_DAYS: 30
depends_on:
postgres:
condition: service_healthy
volumes:
postgres_data: