Files
cloudlense/devops/docker-compose.yml
T
Dennis 88260e1e9a
Build & Deploy / Build & Push Docker Images (push) Has been cancelled
Build & Deploy / Deploy on Server (push) Has been cancelled
Docker Integration / Docker Compose Build (push) Has been cancelled
Frontend CI / Lint, Test & Build (20) (push) Has been cancelled
Frontend CI / Lint, Test & Build (22) (push) Has been cancelled
Add production CI/CD deployment pipeline
Add GHCR image build/push and SSH-based server deployment workflow, production compose/env templates, and deployment script. Also fix frontend container healthcheck target and extend Docker CI with frontend health verification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-15 22:54:14 +02:00

66 lines
1.9 KiB
YAML

services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-monitoring}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-monitoring_pass}
POSTGRES_DB: ${POSTGRES_DB:-monitoring}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-monitoring}"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ../backend
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "5000:5000"
depends_on:
db:
condition: service_healthy
environment:
PORT: 5000
DATABASE_URL: postgresql://${POSTGRES_USER:-monitoring}:${POSTGRES_PASSWORD:-monitoring_pass}@db:5432/${POSTGRES_DB:-monitoring}
CORS_ORIGIN: http://localhost:3000
CHROME_PATH: /usr/bin/chromium
NODE_ENV: production
healthcheck:
test: ["CMD-SHELL", "node -e \"const h=require('http');h.get('http://localhost:5000/health',(r)=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))\""]
interval: 15s
timeout: 10s
retries: 3
start_period: 30s
frontend:
build:
context: ../frontend
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
environment:
NEXT_PUBLIC_API_URL: http://backend:5000
NEXT_PUBLIC_SUPABASE_URL: ${NEXT_PUBLIC_SUPABASE_URL:-}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${NEXT_PUBLIC_SUPABASE_ANON_KEY:-}
NODE_ENV: production
healthcheck:
test: ["CMD-SHELL", "node -e \"const h=require('http');h.get('http://localhost:3000',(r)=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))\""]
interval: 15s
timeout: 10s
retries: 3
start_period: 60s
volumes:
postgres_data: