Files
OpenCut/docker-compose.yaml
T

83 lines
2.0 KiB
YAML
Raw Normal View History

services:
db:
image: postgres:17
restart: unless-stopped
environment:
2025-06-23 10:35:07 +03:00
POSTGRES_USER: opencut
POSTGRES_PASSWORD: opencutthegoat
POSTGRES_DB: opencut
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
2025-06-23 14:42:00 +05:30
healthcheck:
2025-06-24 22:32:37 +05:30
test: ["CMD-SHELL", "pg_isready -U opencut"]
2025-06-23 14:42:00 +05:30
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
2025-06-23 15:12:34 +07:00
redis:
2025-06-24 05:00:34 +08:00
image: redis:7-alpine
restart: unless-stopped
2025-06-23 15:12:34 +07:00
ports:
- "6379:6379"
2025-06-23 14:42:00 +05:30
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
2025-06-23 15:12:34 +07:00
serverless-redis-http:
2025-06-23 14:42:00 +05:30
image: hiett/serverless-redis-http:latest
2025-06-23 15:12:34 +07:00
ports:
- "8079:80"
environment:
SRH_MODE: env
SRH_TOKEN: example_token
SRH_CONNECTION_STRING: "redis://redis:6379"
2025-06-24 05:00:34 +08:00
depends_on:
redis:
condition: service_healthy
2025-06-23 14:42:00 +05:30
healthcheck:
test: ["CMD-SHELL", "wget --spider -q http://127.0.0.1:80 || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
2025-06-24 05:00:34 +08:00
web:
build:
context: .
2025-06-24 05:00:34 +08:00
dockerfile: ./apps/web/Dockerfile
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=postgresql://opencut:opencutthegoat@db:5432/opencut
- BETTER_AUTH_URL=http://localhost:3000
- BETTER_AUTH_SECRET=your-production-secret-key-here
- UPSTASH_REDIS_REST_URL=http://serverless-redis-http:80
- UPSTASH_REDIS_REST_TOKEN=example_token
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
depends_on:
db:
condition: service_healthy
serverless-redis-http:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
volumes:
postgres_data:
2025-06-24 05:00:34 +08:00
networks:
default:
name: opencut-network