invite/docker-compose.yml
chris 2c78112a4f Initial commit: E-Invite, a self-hosted Evite-lite
Docker-ready Next.js + Prisma/Postgres e-invitation app: themed invite
pages, RSVP, comments, share links, email + SMS invites with
reply-to-RSVP-by-text, co-hosts, photo dropbox, and browser push
notifications.
2026-07-11 10:11:12 -04:00

66 lines
2.0 KiB
YAML

services:
app:
build:
context: .
args:
# Baked into the client bundle at build time - see Dockerfile.
NEXT_PUBLIC_VAPID_PUBLIC_KEY: ${NEXT_PUBLIC_VAPID_PUBLIC_KEY:-}
ports:
- "3100:3000"
environment:
DATABASE_URL: ${DATABASE_URL:-postgresql://einvite:einvite@postgres:5432/einvite?schema=public}
APP_URL: ${APP_URL:-http://localhost:3100}
SESSION_SECRET: ${SESSION_SECRET:-change-me-to-a-long-random-string}
COOKIE_SECURE: ${COOKIE_SECURE:-false}
SMTP_HOST: ${SMTP_HOST:-mailpit}
SMTP_PORT: ${SMTP_PORT:-1025}
SMTP_USER: ${SMTP_USER:-}
SMTP_PASS: ${SMTP_PASS:-}
SMTP_FROM: ${SMTP_FROM:-E-Invite <invites@example.com>}
SMTP_SECURE: ${SMTP_SECURE:-false}
NEXT_PUBLIC_VAPID_PUBLIC_KEY: ${NEXT_PUBLIC_VAPID_PUBLIC_KEY:-}
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
VAPID_CONTACT_EMAIL: ${VAPID_CONTACT_EMAIL:-admin@example.com}
TWILIO_ACCOUNT_SID: ${TWILIO_ACCOUNT_SID:-}
TWILIO_AUTH_TOKEN: ${TWILIO_AUTH_TOKEN:-}
TWILIO_PHONE_NUMBER: ${TWILIO_PHONE_NUMBER:-}
volumes:
- uploads-data:/app/public/uploads
depends_on:
postgres:
condition: service_healthy
mailpit:
condition: service_started
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
start_period: 20s
retries: 3
restart: unless-stopped
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: einvite
POSTGRES_PASSWORD: einvite
POSTGRES_DB: einvite
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U einvite"]
interval: 5s
timeout: 5s
retries: 10
restart: unless-stopped
mailpit:
image: axllent/mailpit:latest
ports:
- "8025:8025" # web UI: view caught emails at http://localhost:8025
restart: unless-stopped
volumes:
postgres-data:
uploads-data: