phase 0+1: project scaffold, k8s manifests, CI pipeline, steering, hooks, tests
- Repository structure for all services, infra, lakehouse, dashboards - K8s manifests targeting stonks-oracle namespace with GHCR images - Ingress via Traefik with ca-issuer TLS for internal services - ConfigMap wired to existing cluster services (pg, redis, minio, ollama) - GitHub Actions workflow for lint, test, multi-service container builds - Dockerfile with build-arg CMD per service - Makefile for local build/push/deploy - Steering rules for TDD workflow, K8s conventions, project context - Agent hooks for lint-on-save, test-on-save, k8s-validate, phase-commit - Ruff linter config, all lint issues fixed - 14 passing tests for schemas, config, redis keys - PostgreSQL migrations, Trino catalogs, Superset config, MinIO lifecycle
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: stonks
|
||||
POSTGRES_USER: stonks
|
||||
POSTGRES_PASSWORD: stonks_dev
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
- ./infra/migrations:/docker-entrypoint-initdb.d
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U stonks"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
|
||||
minio:
|
||||
image: minio/minio:latest
|
||||
command: server /data --console-address ":9001"
|
||||
environment:
|
||||
MINIO_ROOT_USER: minioadmin
|
||||
MINIO_ROOT_PASSWORD: minioadmin
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
volumes:
|
||||
- miniodata:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "mc", "ready", "local"]
|
||||
interval: 5s
|
||||
retries: 5
|
||||
|
||||
minio-init:
|
||||
image: minio/mc:latest
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
mc alias set local http://minio:9000 minioadmin minioadmin;
|
||||
mc mb --ignore-existing local/stonks-raw-market;
|
||||
mc mb --ignore-existing local/stonks-raw-news;
|
||||
mc mb --ignore-existing local/stonks-raw-filings;
|
||||
mc mb --ignore-existing local/stonks-normalized;
|
||||
mc mb --ignore-existing local/stonks-llm-prompts;
|
||||
mc mb --ignore-existing local/stonks-llm-results;
|
||||
mc mb --ignore-existing local/stonks-lakehouse;
|
||||
mc mb --ignore-existing local/stonks-audit;
|
||||
exit 0;
|
||||
"
|
||||
|
||||
ollama:
|
||||
image: ollama/ollama:latest
|
||||
ports:
|
||||
- "11434:11434"
|
||||
volumes:
|
||||
- ollama_models:/root/.ollama
|
||||
|
||||
trino:
|
||||
image: trinodb/trino:latest
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./infra/trino/catalog:/etc/trino/catalog
|
||||
depends_on:
|
||||
- minio
|
||||
- hive-metastore
|
||||
|
||||
hive-metastore:
|
||||
image: apache/hive:4.0.0
|
||||
environment:
|
||||
SERVICE_NAME: metastore
|
||||
DB_DRIVER: derby
|
||||
SERVICE_OPTS: "-Djavax.jdo.option.ConnectionURL=jdbc:derby:/opt/hive/data/metastore_db;create=true"
|
||||
ports:
|
||||
- "9083:9083"
|
||||
volumes:
|
||||
- hive_data:/opt/hive/data
|
||||
|
||||
superset:
|
||||
image: apache/superset:latest
|
||||
ports:
|
||||
- "8088:8088"
|
||||
environment:
|
||||
SUPERSET_SECRET_KEY: stonks-dev-secret-key-change-me
|
||||
ADMIN_USERNAME: admin
|
||||
ADMIN_PASSWORD: admin
|
||||
ADMIN_EMAIL: admin@stonks.local
|
||||
volumes:
|
||||
- superset_data:/app/superset_home
|
||||
depends_on:
|
||||
- trino
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
miniodata:
|
||||
ollama_models:
|
||||
hive_data:
|
||||
superset_data:
|
||||
Reference in New Issue
Block a user