Files
DataStack/docker/docker-compose.yml
T
i vib e52e25e990 feat: add Coolify deployment proxy
Route the Coolify HTTPS domain through an internal Nginx proxy to Next.js and Socket.IO. Keep app/backing services private, preserve local development socket URLs, and document Coolify Compose setup.
2026-10-23 20:53:34 -07:00

107 lines
3.0 KiB
YAML

services:
# Next.js Frontend & Admin Console (Port 3000)
web:
build:
context: ..
dockerfile: docker/Dockerfile.web
expose:
- "3000"
environment:
NODE_ENV: production
PORT: "3000"
DATASTACK_JWT_SECRET: "${DATASTACK_JWT_SECRET:?Set DATASTACK_JWT_SECRET in .env}"
DATASTACK_ADMIN_EMAIL: "${DATASTACK_ADMIN_EMAIL:?Set DATASTACK_ADMIN_EMAIL in .env}"
DATASTACK_ADMIN_PASSWORD: "${DATASTACK_ADMIN_PASSWORD:?Set DATASTACK_ADMIN_PASSWORD in .env}"
DATASTACK_ADMIN_SESSION_SECRET: "${DATASTACK_ADMIN_SESSION_SECRET:?Set DATASTACK_ADMIN_SESSION_SECRET in .env}"
DATABASE_URL: "${DATABASE_URL:?Set DATABASE_URL in .env}"
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
# Express + Socket.IO Ingestion Engine (Port 4000)
ingestion:
build:
context: ..
dockerfile: docker/Dockerfile.server
expose:
- "4000"
volumes:
- datastack-data:/app/storage
environment:
NODE_ENV: production
PORT_SOCKET: "4000"
DATASTACK_JWT_SECRET: "${DATASTACK_JWT_SECRET:?Set DATASTACK_JWT_SECRET in .env}"
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:4000/health').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Coolify routes the public domain to this service on its internal port 80.
proxy:
build:
context: ..
dockerfile: docker/Dockerfile.proxy
expose:
- "80"
depends_on:
web:
condition: service_healthy
ingestion:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Reserved for the planned shared buffer integration; not consumed by the current runtime.
redis:
image: redis:7-alpine
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 5s
retries: 3
# Reserved for the planned metadata integration; not consumed by the current runtime.
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: datastack
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}"
POSTGRES_DB: datastack_db
volumes:
- pgdata:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U datastack -d datastack_db"]
interval: 10s
timeout: 5s
retries: 5
volumes:
datastack-data:
pgdata: