Files
vip-coordinator/docker-compose.digitalocean.yml
kyle e9de71ce29 feat: add Digital Ocean deployment configuration
- Create docker-compose.digitalocean.yml for registry-based deployment
- Add .env.digitalocean.example template for cloud deployment
- Add comprehensive DIGITAL_OCEAN_DEPLOYMENT.md guide
- Configure image pulling from Gitea registry
- Include SSL setup with Caddy/Traefik
- Add backup, monitoring, and security instructions

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-31 20:09:48 +01:00

138 lines
3.8 KiB
YAML

version: '3.8'
# ==========================================
# VIP Coordinator - Digital Ocean Deployment
# ==========================================
# This compose file pulls pre-built images from Gitea registry
# No local builds required - perfect for cloud deployment
services:
# PostgreSQL Database
postgres:
image: postgres:16-alpine
container_name: vip-coordinator-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-vip_coordinator}
POSTGRES_USER: ${POSTGRES_USER:-vip_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set}
volumes:
- vip-coordinator-postgres-data:/var/lib/postgresql/data
networks:
- vip-coordinator-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vip_user}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Redis Cache
redis:
image: redis:7-alpine
container_name: vip-coordinator-redis
volumes:
- vip-coordinator-redis-data:/data
networks:
- vip-coordinator-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
command: redis-server --appendonly yes
# NestJS Backend API (from Gitea registry)
backend:
image: ${GITEA_REGISTRY:-192.168.68.53:3000}/kyle/vip-coordinator/backend:${IMAGE_TAG:-latest}
container_name: vip-coordinator-backend
environment:
# Database Configuration
DATABASE_URL: postgresql://${POSTGRES_USER:-vip_user}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-vip_coordinator}
# Redis Configuration
REDIS_URL: redis://redis:6379
# Auth0 Configuration
AUTH0_DOMAIN: ${AUTH0_DOMAIN:?AUTH0_DOMAIN must be set}
AUTH0_AUDIENCE: ${AUTH0_AUDIENCE:?AUTH0_AUDIENCE must be set}
AUTH0_ISSUER: ${AUTH0_ISSUER:?AUTH0_ISSUER must be set}
# Application Configuration
NODE_ENV: production
PORT: 3000
# Optional: AviationStack API (for flight tracking)
AVIATIONSTACK_API_KEY: ${AVIATIONSTACK_API_KEY:-}
# Optional: Database seeding
RUN_SEED: ${RUN_SEED:-false}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- vip-coordinator-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# React Frontend (Nginx) (from Gitea registry)
frontend:
image: ${GITEA_REGISTRY:-192.168.68.53:3000}/kyle/vip-coordinator/frontend:${IMAGE_TAG:-latest}
container_name: vip-coordinator-frontend
ports:
- "${FRONTEND_PORT:-80}:80"
depends_on:
backend:
condition: service_healthy
networks:
- vip-coordinator-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Named volumes for data persistence
volumes:
vip-coordinator-postgres-data:
name: vip-coordinator-postgres-data
vip-coordinator-redis-data:
name: vip-coordinator-redis-data
# Dedicated network for service communication
networks:
vip-coordinator-network:
name: vip-coordinator-network
driver: bridge