From b595e26d6217f4895a3fb5e3cb223674ce3fd419 Mon Sep 17 00:00:00 2001 From: reachableceo Date: Thu, 30 Jul 2026 12:15:49 -0500 Subject: [PATCH] fix: add profile flags to all docker compose commands and complete env vars All services in docker-compose.yml are behind profiles (dev/ops), but the maintenance scripts called docker compose without --profile, so no services were detected or built. Added --profile dev --profile ops to BuildAll.sh, StatusCheck.sh, and all relevant maintenance.sh commands. Also: - Added missing env vars for 8 newer servers to .env.example (beszel, gitea, grafana, ha, limesurvey, linkwarden, superset) - Fixed maintenance.sh validate to use validate-all.sh instead of nonexistent validate-mcp.sh --- .env.example | 31 +++++++++++++++++++++++++++++++ maintenance.sh | 12 ++++++------ scripts/BuildAll.sh | 6 +++--- scripts/StatusCheck.sh | 4 ++-- 4 files changed, 42 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 6569cb0..5b8a06e 100644 --- a/.env.example +++ b/.env.example @@ -98,3 +98,34 @@ PAPERLESS_TOKEN=dummy-paperless-token-replace-with-real ACTUAL_SERVER_URL=https://actual.example.com ACTUAL_PASSWORD=dummy-password-replace-with-real ACTUAL_BUDGET_SYNC_ID=dummy-budget-sync-id + +# Beszel +BESZEL_URL=https://beszel.example.com +BESZEL_USERNAME=dummy-username +BESZEL_PASSWORD=dummy-password-replace-with-real + +# Gitea +GITEA_URL=https://gitea.example.com +GITEA_TOKEN=dummy-token-replace-with-real + +# Grafana +GRAFANA_URL=https://grafana.example.com +GRAFANA_TOKEN=dummy-token-replace-with-real + +# Home Assistant +HOMEASSISTANT_URL=https://ha.example.com +HOMEASSISTANT_TOKEN=dummy-token-replace-with-real + +# Limesurvey +LIMESURVEY_URL=https://limesurvey.example.com +LIMESURVEY_USERNAME=admin +LIMESURVEY_PASSWORD=dummy-password-replace-with-real + +# Linkwarden +LINKWARDEN_URL=https://linkwarden.example.com +LINKWARDEN_TOKEN=dummy-token-replace-with-real + +# Superset +SUPERSET_URL=https://superset.example.com +SUPERSET_USERNAME=admin +SUPERSET_PASSWORD=dummy-password-replace-with-real diff --git a/maintenance.sh b/maintenance.sh index 5200b2b..0a80909 100755 --- a/maintenance.sh +++ b/maintenance.sh @@ -65,7 +65,7 @@ build_service() { exit 1 fi echo -e "${GREEN}=== Building $service ===${NC}" - docker compose build "$service" + docker compose --profile dev --profile ops build "$service" } # Function to clean vendor directory @@ -89,19 +89,19 @@ status() { # Function to validate MCP servers validate() { echo -e "${GREEN}=== Validating MCP Servers ===${NC}" - ./scripts/validate-mcp.sh + ./scripts/validate-all.sh mcp } # Function to show logs logs() { echo -e "${GREEN}=== Service Logs ===${NC}" - docker compose logs -f + docker compose --profile dev --profile ops logs -f } # Function to show process status ps() { echo -e "${GREEN}=== Service Process Status ===${NC}" - docker compose ps + docker compose --profile dev --profile ops ps } # Function to start services @@ -126,8 +126,8 @@ rebuild() { exit 1 fi echo -e "${GREEN}=== Rebuilding $service ===${NC}" - docker compose build --no-cache "$service" - docker compose up -d "$service" + docker compose --profile dev --profile ops build --no-cache "$service" + docker compose --profile dev --profile ops up -d "$service" } # Main script logic diff --git a/scripts/BuildAll.sh b/scripts/BuildAll.sh index 0c593ce..f151974 100755 --- a/scripts/BuildAll.sh +++ b/scripts/BuildAll.sh @@ -20,13 +20,13 @@ echo "" # Change to project root (parent of scripts/) cd "$(dirname "${BASH_SOURCE[0]}")/.." -# Get list of all services from docker-compose.yml -SERVICES=$(docker compose config --services) +# Get list of all services from docker-compose.yml (include all profiles) +SERVICES=$(docker compose --profile dev --profile ops config --services | sort) # Build each service for SERVICE in $SERVICES; do echo -e "${BLUE}Building: ${SERVICE}${NC}" - if docker compose build "$SERVICE" 2>&1 | tail -5; then + if docker compose --profile dev --profile ops build "$SERVICE" 2>&1 | tail -5; then echo -e "${GREEN}✓${NC} Successfully built $SERVICE" else echo -e "${RED}✗${NC} Failed to build $SERVICE" diff --git a/scripts/StatusCheck.sh b/scripts/StatusCheck.sh index 6376afb..af16514 100755 --- a/scripts/StatusCheck.sh +++ b/scripts/StatusCheck.sh @@ -18,8 +18,8 @@ echo "" # Change to project root (parent of scripts/) cd "$(dirname "${BASH_SOURCE[0]}")/.." -# Get list of all services from docker-compose.yml -SERVICES=$(docker compose config --services | sort) +# Get list of all services from docker-compose.yml (include all profiles) +SERVICES=$(docker compose --profile dev --profile ops config --services | sort) # Counters TOTAL=0