Add worktree sandbox and test env workflow
This commit is contained in:
30
scripts/worktree-up.sh
Executable file
30
scripts/worktree-up.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
REPO_ROOT=$(cd "${SCRIPT_DIR}/.." && pwd)
|
||||
DEFAULT_SANDBOX="${REPO_ROOT}/../galaxyforge-sandbox"
|
||||
SANDBOX_PATH="${1:-$DEFAULT_SANDBOX}"
|
||||
|
||||
if [[ "$SANDBOX_PATH" != /* ]]; then
|
||||
SANDBOX_PATH="${REPO_ROOT}/${SANDBOX_PATH}"
|
||||
fi
|
||||
|
||||
SANDBOX_PATH=$(realpath -m "$SANDBOX_PATH")
|
||||
|
||||
"${SCRIPT_DIR}/worktree-sync.sh" "$SANDBOX_PATH"
|
||||
|
||||
if [[ ! -f "$SANDBOX_PATH/docker-compose.yml" ]]; then
|
||||
echo "Fehler: docker-compose.yml fehlt in der Sandbox: $SANDBOX_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(
|
||||
cd "$SANDBOX_PATH"
|
||||
docker compose up -d --build
|
||||
)
|
||||
|
||||
echo "Sandbox laeuft. URLs:"
|
||||
echo "- http://localhost/"
|
||||
echo "- http://localhost/m"
|
||||
echo "- http://localhost/api/health"
|
||||
Reference in New Issue
Block a user