Files
DataStack/docker/docker-compose.yml
T

106 lines
3.0 KiB
YAML
Raw Normal View History

2026-10-23 11:43:49 -05:00
services:
# Next.js Frontend & Admin Console (Port 3000)
web:
build:
context: ..
dockerfile: docker/Dockerfile.web
2026-10-23 20:53:34 -07:00
expose:
- "3000"
2026-10-23 11:43:49 -05:00
environment:
2026-10-23 19:56:38 -07:00
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}"
2026-10-23 11:43:49 -05:00
restart: unless-stopped
2026-10-23 19:56:38 -07:00
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
2026-10-23 11:43:49 -05:00
# Express + Socket.IO Ingestion Engine (Port 4000)
ingestion:
build:
context: ..
dockerfile: docker/Dockerfile.server
2026-10-23 20:53:34 -07:00
expose:
- "4000"
2026-10-23 11:43:49 -05:00
volumes:
2026-10-23 19:56:38 -07:00
- datastack-data:/app/storage
2026-10-23 11:43:49 -05:00
environment:
2026-10-23 19:56:38 -07:00
NODE_ENV: production
PORT_SOCKET: "4000"
DATASTACK_JWT_SECRET: "${DATASTACK_JWT_SECRET:?Set DATASTACK_JWT_SECRET in .env}"
2026-10-23 11:43:49 -05:00
restart: unless-stopped
2026-10-23 19:56:38 -07:00
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
2026-10-23 11:43:49 -05:00
2026-10-23 20:53:34 -07:00
# 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
2026-10-23 19:56:38 -07:00
# Reserved for the planned shared buffer integration; not consumed by the current runtime.
2026-10-23 11:43:49 -05:00
redis:
image: redis:7-alpine
restart: unless-stopped
2026-10-23 19:56:38 -07:00
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 5s
retries: 3
2026-10-23 11:43:49 -05:00
2026-10-23 19:56:38 -07:00
# Reserved for the planned metadata integration; not consumed by the current runtime.
2026-10-23 11:43:49 -05:00
postgres:
image: postgres:16-alpine
environment:
2026-10-23 19:56:38 -07:00
POSTGRES_USER: datastack
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in .env}"
POSTGRES_DB: datastack_db
2026-10-23 11:43:49 -05:00
volumes:
- pgdata:/var/lib/postgresql/data
restart: unless-stopped
2026-10-23 19:56:38 -07:00
healthcheck:
test: ["CMD-SHELL", "pg_isready -U datastack -d datastack_db"]
interval: 10s
timeout: 5s
retries: 5
2026-10-23 11:43:49 -05:00
volumes:
2026-10-23 19:56:38 -07:00
datastack-data:
2026-10-23 11:43:49 -05:00
pgdata: