Files
KSP-MissionControl/infra/docker-compose.yml
T
Mavis 938ba042b3
CI / Lint, typecheck, test, build (push) Failing after 22s
Phase 0: fix typecheck, format, build; remove stray emit; pin port via env
2026-06-02 16:07:09 +00:00

83 lines
2.1 KiB
YAML

# Docker Compose for the kerbal-rt data tier.
#
# Phase 0 ships this as a deliverable but doesn't run anything here
# (no Docker available in the dev sandbox). Bring it up with:
#
# docker compose -f infra/docker-compose.yml up -d
#
# Then point the API at it via .env (see .env.example).
#
# Replaces the in-memory StateStore in apps/api/src/state.ts.
# Phase 1 wires Postgres + Timescale (telemetry), Redis (pubsub),
# and MinIO (media) into the API.
services:
postgres:
image: timescale/timescaledb:2.16.1-pg16
restart: unless-stopped
environment:
POSTGRES_USER: kerbal
POSTGRES_PASSWORD: kerbal
POSTGRES_DB: kerbal_rt
ports:
- '5432:5432'
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init-sql:/docker-entrypoint-initdb.d
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U kerbal -d kerbal_rt']
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7.4-alpine
restart: unless-stopped
command: ['redis-server', '--appendonly', 'yes']
ports:
- '6379:6379'
volumes:
- redis-data:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 3s
retries: 10
minio:
image: minio/minio:RELEASE.2024-09-13T20-26-02Z
restart: unless-stopped
command: ['server', '/data', '--console-address', ':9001']
environment:
MINIO_ROOT_USER: kerbal
MINIO_ROOT_PASSWORD: kerbal-secret-change-me
ports:
- '9000:9000' # S3 API
- '9001:9001' # Web console
volumes:
- minio-data:/data
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:9000/minio/health/live']
interval: 10s
timeout: 5s
retries: 5
# pgAdmin is convenient in dev; comment out for prod
pgadmin:
image: dpage/pgadmin4:8
restart: unless-stopped
profiles: ['dev']
environment:
PGADMIN_DEFAULT_EMAIL: admin@kerbal.local
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- '5050:80'
depends_on:
postgres:
condition: service_healthy
volumes:
postgres-data:
redis-data:
minio-data: