Skip to content

Profile Validation Results

Norm Brandinger edited this page Nov 20, 2025 · 1 revision

Profile Validation Results

Summary

ALL PROFILES VALIDATED SUCCESSFULLY

Docker Compose profile labels have been added to all services in docker-compose.yml. All profile combinations have been tested and validated.

Date: 2025-11-10 Docker Compose Version: 2.x (profiles supported since v1.28.0)

Profile Test Results

Profile: minimal

Command:

docker compose --profile minimal config --services

Services (5):

  1. forgejo
  2. pgbouncer
  3. postgres
  4. redis-1
  5. vault

Status: ✅ PASS Expected RAM: ~2GB Use Case: Essential services only - Git server + single database


Profile: standard

Command:

docker compose --profile standard config --services

Services (10):

  1. forgejo
  2. mongodb
  3. mysql
  4. pgbouncer
  5. postgres
  6. rabbitmq
  7. redis-1
  8. redis-2
  9. redis-3
  10. vault

Status: ✅ PASS Expected RAM: ~4GB Use Case: Full development stack with Redis cluster


Profile: full

Command:

docker compose --profile full config --services

Services (18):

  1. cadvisor
  2. forgejo
  3. grafana
  4. loki
  5. mongodb
  6. mysql
  7. pgbouncer
  8. postgres
  9. prometheus
  10. rabbitmq
  11. redis-1
  12. redis-2
  13. redis-3
  14. redis-exporter-1
  15. redis-exporter-2
  16. redis-exporter-3
  17. vault
  18. vector

Status: ✅ PASS Expected RAM: ~6GB Use Case: Complete suite with observability


Profile: reference (standalone)

Command:

docker compose --profile reference config --services

Result:

service "reference-api" depends on undefined service "mysql": invalid compose project

Status: ✅ EXPECTED BEHAVIOR Reason: Reference apps depend on infrastructure services. This profile must be combined with minimal, standard, or full.


Combined: standard + reference

Command:

docker compose --profile standard --profile reference config --services

Services (15):

  1. api-first (Python FastAPI API-first)
  2. forgejo
  3. golang-api (Go with Gin)
  4. mongodb
  5. mysql
  6. nodejs-api (Node.js with Express)
  7. pgbouncer
  8. postgres
  9. rabbitmq
  10. redis-1
  11. redis-2
  12. redis-3
  13. reference-api (Python FastAPI code-first)
  14. rust-api (Rust with Actix-web)
  15. vault

Status: ✅ PASS Expected RAM: ~5GB (4GB standard + 1GB reference) Use Case: Full development stack + API examples


Combined: minimal + reference

Command:

docker compose --profile minimal --profile reference config --services

Result:

service "reference-api" depends on undefined service "mysql": invalid compose project

Status: ⚠️ NOT SUPPORTED Reason: Reference apps need full database stack (including MySQL, MongoDB) which are only in standard/full profiles.

Workaround: Use standard + reference or full + reference instead.


Service Profile Assignments

Service minimal standard full reference Always Start
vault - - - -
postgres - -
pgbouncer - -
forgejo - -
redis-1 - -
redis-2 - - -
redis-3 - - -
mysql - - -
mongodb - - -
rabbitmq - - -
prometheus - - - -
grafana - - - -
loki - - - -
vector - - - -
cadvisor - - - -
redis-exporter-1 - - - -
redis-exporter-2 - - - -
redis-exporter-3 - - - -
reference-api - - - -
api-first - - - -
golang-api - - - -
nodejs-api - - - -
rust-api - - - -

Legend:

  • ✅ = Included in this profile
  • - = Not included in this profile

Profile Hierarchy Validation

minimal ⊂ standard ⊂ full (Confirmed)

All services in minimal are also in standard. All services in standard are also in full.

minimal (5 services)
  ├── vault
  ├── postgres
  ├── pgbouncer
  ├── forgejo
  └── redis-1

standard (10 services = minimal + 5)
  ├── All minimal services
  ├── mysql
  ├── mongodb
  ├── redis-2
  ├── redis-3
  └── rabbitmq

full (18 services = standard + 8)
  ├── All standard services
  ├── prometheus
  ├── grafana
  ├── loki
  ├── vector
  ├── cadvisor
  ├── redis-exporter-1
  ├── redis-exporter-2
  └── redis-exporter-3

reference (5 services, combinable)
  ├── reference-api
  ├── api-first
  ├── golang-api
  ├── nodejs-api
  └── rust-api

Service Dependencies Validation

Vault (Always Starts)

✅ No dependencies ✅ All other services depend on vault

Services Depending on Vault

All services have:

depends_on:
  vault:
    condition: service_healthy

This ensures:

  1. Vault starts first
  2. Vault becomes healthy (unsealed)
  3. Services can fetch credentials from Vault

Redis Cluster Dependencies

  • redis-2 depends on: vault
  • redis-3 depends on: vault
  • No inter-node dependencies (correct for dev cluster)

Observability Dependencies

  • prometheus: depends on vault only
  • grafana: depends on vault, prometheus
  • loki: depends on vault only
  • vector: depends on vault, loki, prometheus, postgres, mongodb
  • redis-exporters: depend on vault, respective redis node

✅ All dependencies are within the same profile or broader profiles

Redis Configuration by Profile

Minimal Profile

  • Services: redis-1 only
  • Mode: Standalone (no cluster)
  • Config: REDIS_CLUSTER_ENABLED=false
  • Initialization: Not required
  • Connection: redis-cli -h localhost -p 6379

Standard/Full Profiles

  • Services: redis-1, redis-2, redis-3
  • Mode: Cluster (3 masters, no replicas)
  • Config: REDIS_CLUSTER_ENABLED=true
  • Initialization: Required after first start
  • Connection: redis-cli -c -h localhost -p 6379 (note the -c flag)

Initialization Command:

docker exec dev-redis-1 redis-cli --cluster create \
  172.20.0.13:6379 172.20.0.16:6379 172.20.0.17:6379 \
  --cluster-yes -a $REDIS_PASSWORD

Recommended Profile Combinations

✅ Supported Combinations

  1. minimal alone

    • Use case: Git hosting + basic dev
    • Services: 5
    • RAM: ~2GB
  2. standard alone

    • Use case: Multi-database development + Redis cluster
    • Services: 10
    • RAM: ~4GB
  3. full alone

    • Use case: Complete stack with observability
    • Services: 18
    • RAM: ~6GB
  4. standard + reference

    • Use case: API development with full database stack
    • Services: 15
    • RAM: ~5GB
  5. full + reference

    • Use case: API development with observability
    • Services: 23
    • RAM: ~7GB

❌ Unsupported Combinations

  1. minimal + reference

    • Reason: Reference apps need MySQL + MongoDB (not in minimal)
    • Workaround: Use standard + reference
  2. reference alone

    • Reason: Reference apps need infrastructure services
    • Workaround: Use standard + reference or full + reference

Next Steps

  1. Phase 1: Docker Compose Profile Labels - COMPLETED

    • All services have profile assignments
    • All profiles validated with docker compose --profile <name> config --services
    • Dependencies verified
  2. Phase 2: Profile Environment Files - IN PROGRESS

    • Create configs/profiles/minimal.env
    • Create configs/profiles/standard.env
    • Create configs/profiles/full.env
    • Create configs/profiles/reference.env
  3. Phase 3: Python Management Script - PENDING

    • Create devstack.py
    • Implement profile-aware commands
    • Add profile listing and validation
    • Replace bash script gradually
  4. Phase 4: Documentation Updates - PENDING

    • Update README.md with profile quick start
    • Update INSTALLATION.md with profile-based setup
    • Update documentation with profile architecture
    • Create testing and validation scripts

Validation Checklist

  • profiles.yaml created with all profile definitions
  • Profile labels added to docker-compose.yml
  • Minimal profile validated (5 services)
  • Standard profile validated (10 services)
  • Full profile validated (18 services)
  • Reference profile validated (5 services)
  • Combined profiles validated (standard + reference)
  • Service dependencies verified
  • Profile hierarchy confirmed (minimal ⊂ standard ⊂ full)
  • Profile environment files created
  • Python management script created
  • Documentation updated
  • Real-world testing (start services, verify health)

Issues Found and Resolved

Issue 1: Vector Missing Profile Label

Problem: vector service wasn't assigned to any profile, causing dependency errors.

Root Cause: The add-profile-labels.py script pattern matched restart: unless-stopped followed immediately by entrypoint:. Vector had a blank line before entrypoint:.

Resolution: Manually added profile label to vector service:

# PROFILE: Available in full profile only
# Unified observability data pipeline
profiles: ["full"]

Status: ✅ RESOLVED

Issue 2: Reference Profile Standalone

Problem: docker compose --profile reference config fails with dependency error.

Root Cause: Reference apps depend on mysql, mongodb, rabbitmq which are in standard/full profiles only.

Resolution: This is expected behavior. Reference profile is designed to be combinable with other profiles, not standalone.

Documentation: Updated profile descriptions to clarify reference is combinable.

Status: ✅ EXPECTED BEHAVIOR (not a bug)

Validation Complete

All profile configurations are working as designed

The service profile system is ready for:

  1. Creating profile-specific environment files
  2. Implementing Python management script
  3. Updating end-user documentation
  4. Real-world testing with service startup

Ready to proceed to Phase 2: Profile Environment Files

Clone this wiki locally