mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
- Add docker/sandbox/entrypoint.sh to auto-copy /ui-dist → internal/server/dist/ when missing, fixing the gitignore regression for all Docker workflows - Add scripts/_sandbox_common.sh with shared SCRIPT_DIR, PROJECT_ROOT, COMPOSE_FILE, and require_docker() function - Refactor all 5 sandbox scripts to source _sandbox_common.sh - Use YAML extension fields (x-sandbox-common) in docker-compose.sandbox.yml to eliminate duplicated service config - Break sandbox_playground_up.sh one-liner into readable steps, add skillshare-ui alias and init hint - Change test.sh to use `make build` for placeholder consistency
19 lines
552 B
Bash
19 lines
552 B
Bash
#!/usr/bin/env bash
|
|
# Shared boilerplate for Docker sandbox scripts.
|
|
# Source this file: source "$(dirname "$0")/_sandbox_common.sh"
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
COMPOSE_FILE="$PROJECT_ROOT/docker-compose.sandbox.yml"
|
|
|
|
require_docker() {
|
|
if ! command -v docker >/dev/null 2>&1; then
|
|
echo "Error: docker command not found" >&2
|
|
exit 1
|
|
fi
|
|
if ! docker compose version >/dev/null 2>&1; then
|
|
echo "Error: docker compose plugin not available" >&2
|
|
exit 1
|
|
fi
|
|
}
|