Master API, Admin UI, Go media-node, Docker/Dokploy deploy configs. Co-authored-by: Cursor <cursoragent@cursor.com>
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: media
|
|
POSTGRES_PASSWORD: media_secret
|
|
POSTGRES_DB: media_cluster
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U media -d media_cluster"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
master-api:
|
|
build:
|
|
context: ../..
|
|
dockerfile: deploy/docker/Dockerfile.master-api
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ../master/.env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
ports:
|
|
- "3000:3000"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:3000/health"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
admin-ui:
|
|
build:
|
|
context: ../..
|
|
dockerfile: deploy/docker/Dockerfile.admin-ui
|
|
restart: unless-stopped
|
|
environment:
|
|
NEXT_PUBLIC_API_URL: http://master-api:3000
|
|
depends_on:
|
|
- master-api
|
|
ports:
|
|
- "3001:3000"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|