refactor(compose): split monolith into stella-infra + stella-services

- Extract infrastructure (postgres, valkey, rustfs, zot, rekor) to docker-compose.stella-infra.yml
- Move application services to docker-compose.stella-services.yml
- Convert scalar YAML anchors to .env variables for cross-file compatibility
- Duplicate structural anchors locally in services file
- Remove cross-file depends_on (services already have connection retry)
- Legacy monolith retained for backwards compatibility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
master
2026-04-08 13:11:47 +03:00
parent 53f294400f
commit b3198a66c7
4 changed files with 2421 additions and 118 deletions

View File

@@ -1,11 +1,14 @@
# =============================================================================
# STELLA OPS ENVIRONMENT CONFIGURATION
# =============================================================================
# Main environment template for docker-compose.stella-ops.yml
# Copy to .env and customize for your deployment.
# Environment variables for the Stella Ops Docker Compose stack.
#
# Usage:
# cp env/stellaops.env.example .env
# Usage (split infra/services files -- preferred):
# docker compose \
# -f docker-compose.stella-infra.yml \
# -f docker-compose.stella-services.yml up -d
#
# Usage (legacy monolith):
# docker compose -f docker-compose.stella-ops.yml up -d
#
# =============================================================================
@@ -26,6 +29,23 @@ VALKEY_PORT=6379
# RustFS Object Storage
RUSTFS_HTTP_PORT=8080
# =============================================================================
# SHARED CONNECTION STRINGS (used by docker-compose.stella-services.yml)
# =============================================================================
# These replace YAML anchors (*postgres-connection, *postgres-authority-connection)
# that cannot cross Docker Compose file boundaries.
STELLAOPS_POSTGRES_CONNECTION=Host=db.stella-ops.local;Port=5432;Database=stellaops_platform;Username=stellaops;Password=stellaops;Maximum Pool Size=50
STELLAOPS_POSTGRES_AUTHORITY_CONNECTION=Host=db.stella-ops.local;Port=5432;Database=stellaops_authority;Username=stellaops;Password=stellaops;Maximum Pool Size=20;Minimum Pool Size=2
# =============================================================================
# SHARED VOLUME MOUNTS (used by docker-compose.stella-services.yml)
# =============================================================================
# These replace YAML anchors (*cert-volume, *ca-bundle) for cross-file usage.
STELLAOPS_CERT_VOLUME=../../etc/authority/keys:/app/etc/certs:ro
STELLAOPS_CA_BUNDLE_VOLUME=./combined-ca-bundle.crt:/etc/ssl/certs/ca-certificates.crt:ro
# =============================================================================
# CORE SERVICES
# =============================================================================