Files
nextstep/docker-compose.yml
Gemini Agent c9f3402e48 Configure VAPID keys for push notifications
Added VAPID key configuration to enable PWA push notifications:
- Generated VAPID public/private key pair
- Added build arg for NEXT_PUBLIC_VAPID_PUBLIC_KEY (needed at Next.js build time)
- Added runtime env vars for VAPID keys in docker-compose.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:45:38 +00:00

66 lines
1.9 KiB
YAML

services:
app:
build:
context: .
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_VAPID_PUBLIC_KEY=BEFs_VtoxY7SpNnd-ubz1ioliESlRI4sY6ny7Qp3rm7V1cm0gqyZX8TAHp4AaQ81yKC4LfWtJFQz_aHc25G-Tww
container_name: nextstep-app
restart: unless-stopped
ports:
- "4678:3000" # Bind to all interfaces for Tailscale access
environment:
- DATABASE_URL=postgresql://nextstep:${DB_PASSWORD:-nextstep}@db:5432/nextstep?schema=public
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- NEXT_PUBLIC_APP_URL=https://debianvm.kangaroo-eel.ts.net:10000
- TZ=Australia/Perth
- NODE_ENV=production
# Push notification VAPID keys
- NEXT_PUBLIC_VAPID_PUBLIC_KEY=BEFs_VtoxY7SpNnd-ubz1ioliESlRI4sY6ny7Qp3rm7V1cm0gqyZX8TAHp4AaQ81yKC4LfWtJFQz_aHc25G-Tww
- VAPID_PRIVATE_KEY=KgVQVO7XhfCklrJ3o9wowzK90AxI6Exg9pXPq76Qx4A
- VAPID_EMAIL=mailto:admin@nextstep.local
depends_on:
db:
condition: service_healthy
networks:
- nextstep-network
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: postgres:16-alpine
container_name: nextstep-db
restart: unless-stopped
environment:
- POSTGRES_USER=nextstep
- POSTGRES_PASSWORD=${DB_PASSWORD:-nextstep}
- POSTGRES_DB=nextstep
- TZ=Australia/Perth
- PGTZ=Australia/Perth
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- nextstep-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nextstep -d nextstep"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# Expose PostgreSQL to localhost for migrations
ports:
- "127.0.0.1:5432:5432"
volumes:
postgres_data:
name: nextstep-postgres-data
networks:
nextstep-network:
name: nextstep-network
driver: bridge