chore: optimize cms startup, refactor scripts and implement real-time dev mode
This commit is contained in:
27
scripts/cms-up.sh
Executable file
27
scripts/cms-up.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Configuration
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
echo "🚀 Starting CMS infrastructure..."
|
||||
|
||||
# 1. Build extensions (pass all arguments to handle flags like --link)
|
||||
"$SCRIPT_DIR/sync-extensions.sh" "$@"
|
||||
|
||||
# Filter out --link before passing to docker compose
|
||||
DOCKER_ARGS=()
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" != "--link" ]; then
|
||||
DOCKER_ARGS+=("$arg")
|
||||
fi
|
||||
done
|
||||
|
||||
# 2. Docker compose up with arguments
|
||||
cd "$REPO_ROOT/packages/cms-infra"
|
||||
docker compose up -d "${DOCKER_ARGS[@]}"
|
||||
|
||||
# 3. Apply core patch
|
||||
"$SCRIPT_DIR/patch-cms.sh"
|
||||
|
||||
echo "✨ CMS is up and patched!"
|
||||
Reference in New Issue
Block a user