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:
+13
-5
@@ -2,21 +2,29 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ENV="default-environment.env"
|
||||
SECRETS="secrets/stack-secrets.env"
|
||||
PROJECT_ROOT="${PROJECT_ROOT:-/compose}"
|
||||
ENV="$PROJECT_ROOT/default-environment.env"
|
||||
SECRETS="$PROJECT_ROOT/secrets/stack-secrets.env"
|
||||
PROJECT="core"
|
||||
|
||||
FILES=(
|
||||
-f default-network.yml
|
||||
-f "$PROJECT_ROOT/default-network.yml"
|
||||
)
|
||||
|
||||
while IFS= read -r file; do
|
||||
FILES+=(-f "$file")
|
||||
done < <(
|
||||
find apps monitoring core \
|
||||
find "$PROJECT_ROOT/apps" "$PROJECT_ROOT/monitoring" "$PROJECT_ROOT/core" \
|
||||
-type f \
|
||||
\( -name 'docker-compose.yml' -o -name 'docker-compose.yaml' \) \
|
||||
2>/dev/null \
|
||||
| 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[@]}" \
|
||||
"$@"
|
||||
|
||||
Reference in New Issue
Block a user