Merge pull request #17 from beatz174-bit/codex/fix-node-red-container-startup-issue

Respect PROJECT_ROOT and use --project-directory in services-up.sh
This commit is contained in:
beatz174-bit
2026-04-13 08:27:20 +10:00
committed by GitHub
+13 -5
View File
@@ -2,21 +2,29 @@
set -euo pipefail set -euo pipefail
ENV="default-environment.env" PROJECT_ROOT="${PROJECT_ROOT:-/compose}"
SECRETS="secrets/stack-secrets.env" ENV="$PROJECT_ROOT/default-environment.env"
SECRETS="$PROJECT_ROOT/secrets/stack-secrets.env"
PROJECT="core" PROJECT="core"
FILES=( FILES=(
-f default-network.yml -f "$PROJECT_ROOT/default-network.yml"
) )
while IFS= read -r file; do while IFS= read -r file; do
FILES+=(-f "$file") FILES+=(-f "$file")
done < <( done < <(
find apps monitoring core \ find "$PROJECT_ROOT/apps" "$PROJECT_ROOT/monitoring" "$PROJECT_ROOT/core" \
-type f \ -type f \
\( -name 'docker-compose.yml' -o -name 'docker-compose.yaml' \) \ \( -name 'docker-compose.yml' -o -name 'docker-compose.yaml' \) \
2>/dev/null \
| sort | sort
) )
docker compose -p "$PROJECT" --env-file "$ENV" --env-file "$SECRETS" "${FILES[@]}" "$@" docker compose \
--project-directory "$PROJECT_ROOT" \
-p "$PROJECT" \
--env-file "$ENV" \
--env-file "$SECRETS" \
"${FILES[@]}" \
"$@"