fix(directus): resolve login failures and standardize project branding
- Fixed project isolation bypass (identity shadowing) by prefixing database service name. - Standardized health check paths and protocols in docker-compose.yml. - Resolved extension SyntaxError caused by duplicate banner injections in build scripts. - Migrated extension build system to clean esbuild-based bundles (removing shims). - Updated sync-directus.sh for project-prefixed service name. - Synchronized latest production data and branding (AT Mintel).
This commit is contained in:
@@ -37,7 +37,7 @@ esac
|
||||
|
||||
# Detect local containers
|
||||
echo "🔍 Detecting local database..."
|
||||
LOCAL_DB_CONTAINER=$(docker compose ps -q directus-db)
|
||||
LOCAL_DB_CONTAINER=$(docker compose ps -q at-mintel-directus-db)
|
||||
if [ -z "$LOCAL_DB_CONTAINER" ]; then
|
||||
echo "❌ Local directus-db container not found. Is it running? (npm run dev)"
|
||||
exit 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
EXTENSIONS_ROOT="$REPO_ROOT/packages"
|
||||
TARGET_DIR="$REPO_ROOT/packages/cms-infra/extensions"
|
||||
TARGET_DIR="$REPO_ROOT/directus/extensions"
|
||||
|
||||
# List of extensions to sync - including modules and endpoints
|
||||
EXTENSIONS=(
|
||||
@@ -20,6 +20,10 @@ echo "🚀 Starting extension sync..."
|
||||
# Ensure target directory exists
|
||||
mkdir -p "$TARGET_DIR"
|
||||
|
||||
# Build the acquisition library first so extensions use the updated build
|
||||
echo "📦 Building acquisition-library..."
|
||||
(cd "$REPO_ROOT/packages/acquisition-library" && pnpm build)
|
||||
|
||||
for EXT in "${EXTENSIONS[@]}"; do
|
||||
EXT_PATH="$EXTENSIONS_ROOT/$EXT"
|
||||
|
||||
@@ -55,10 +59,11 @@ for EXT in "${EXTENSIONS[@]}"; do
|
||||
fi
|
||||
|
||||
# Sync node_modules if they exist (sometimes needed if not everything is bundled)
|
||||
if [ -d "$EXT_PATH/node_modules" ]; then
|
||||
echo "📚 Syncing node_modules for $EXT..."
|
||||
rsync -a --delete "$EXT_PATH/node_modules/" "$TARGET_DIR/$EXT/node_modules/"
|
||||
fi
|
||||
# Deactivated: Causes global scope pollution and login issues in Directus
|
||||
# if [ -d "$EXT_PATH/node_modules" ]; then
|
||||
# echo "📚 Syncing node_modules for $EXT..."
|
||||
# rsync -aL --delete "$EXT_PATH/node_modules/" "$TARGET_DIR/$EXT/node_modules/"
|
||||
# fi
|
||||
|
||||
echo "✅ $EXT synced."
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user