67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
services:
|
|
# Next.js Application
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_URL=${DATABASE_URL}
|
|
- RUNTIME_DATABASE_URL=${RUNTIME_DATABASE_URL:-${DATABASE_URL}}
|
|
- SHADOW_DATABASE_URL=${SHADOW_DATABASE_URL}
|
|
- SESSION_SECRET=${SESSION_SECRET}
|
|
- CSRF_SECRET=${CSRF_SECRET}
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
|
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
|
|
- SMTP_HOST=${SMTP_HOST}
|
|
- SMTP_PORT=${SMTP_PORT}
|
|
- SMTP_USER=${SMTP_USER}
|
|
- SMTP_PASS=${SMTP_PASS}
|
|
- ENABLE_NOTIFICATIONS=${ENABLE_NOTIFICATIONS:-true}
|
|
- ENABLE_ANALYTICS=${ENABLE_ANALYTICS:-false}
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
# Using Supabase for database (configure DATABASE_URL to point to Supabase)
|
|
# Redis is optional for rate limiting
|
|
depends_on:
|
|
- redis
|
|
|
|
# Redis for rate limiting (optional)
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: always
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
command: redis-server --appendonly yes
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 3
|
|
|
|
# RedisInsight - Official Redis GUI Dashboard
|
|
redisinsight:
|
|
image: redis/redisinsight:latest
|
|
restart: always
|
|
ports:
|
|
- "8001:5540"
|
|
volumes:
|
|
- redisinsight_data:/data
|
|
depends_on:
|
|
- redis
|
|
environment:
|
|
- RITRUSTEDORIGINS=http://localhost:8001,http://127.0.0.1:8001
|
|
|
|
volumes:
|
|
redis_data:
|
|
redisinsight_data:
|