stremio/deploy/docker/docker-compose.dokploy.yml
Jos Vooges | STH 0a007aae83 Fix admin→master connectivity via host fallback; use generic login branding.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 00:45:53 +02:00

98 lines
2.4 KiB
YAML

# Docker Compose tuned for Dokploy
# Deploy as: Compose application → Git provider → compose path:
# deploy/docker/docker-compose.dokploy.yml
#
# Set environment variables in the Dokploy UI (Environment tab).
# Dokploy writes them to .env next to this compose file.
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-media}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-media_cluster}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-media} -d $${POSTGRES_DB:-media_cluster}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- media-cluster
redis:
image: redis:7-alpine
restart: unless-stopped
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- media-cluster
master-api:
build:
context: ../..
dockerfile: deploy/docker/Dockerfile.master-api
restart: unless-stopped
env_file:
- .env
environment:
NODE_ENV: production
HOST: 0.0.0.0
PORT: 3000
DATABASE_URL: postgresql://${POSTGRES_USER:-media}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-media_cluster}
REDIS_URL: redis://redis:6379
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
# Host ports (avoid Dokploy UI on :3000)
ports:
- "3100:3000"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
networks:
media-cluster:
aliases:
- master-api
admin-ui:
build:
context: ../..
dockerfile: deploy/docker/Dockerfile.admin-ui
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
HOSTNAME: 0.0.0.0
PORT: "3000"
# Prefer compose DNS; fallback via published host port
MASTER_API_URL: http://master-api:3000
NEXT_PUBLIC_API_URL: http://master-api:3000
depends_on:
master-api:
condition: service_healthy
ports:
- "3101:3000"
networks:
- media-cluster
volumes:
postgres_data:
redis_data:
networks:
media-cluster:
driver: bridge