mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
Sandbox (8→2): consolidate into `make playground` + `playground-down`, add scripts/sandbox.sh wrapper for advanced ops (up/down/shell/reset/ status/logs/bare). Test (7→5): remove test-cover and test-install from Make (still available via scripts directly). Dev Docker (3→2): merge dev-docker-up and dev-docker-watch into `make dev-docker` (defaults to Compose Watch for auto-rebuild), keep dev-docker-down. Update all docs references: README, CLAUDE.md, quick-reference, docker-sandbox guide, ui command page.
23 lines
792 B
Bash
Executable File
23 lines
792 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Enter the running Docker playground or execute a command inside it.
|
|
set -euo pipefail
|
|
|
|
source "$(dirname "$0")/_sandbox_common.sh"
|
|
SERVICE="sandbox-playground"
|
|
|
|
require_docker
|
|
cd "$PROJECT_ROOT"
|
|
|
|
if [[ -z "$(docker compose -f "$COMPOSE_FILE" --profile playground ps -q "$SERVICE")" ]]; then
|
|
echo "Playground is not running. Start it first:"
|
|
echo " make playground # start + enter shell (one step)"
|
|
echo " ./scripts/sandbox.sh up # start only"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $# -gt 0 ]]; then
|
|
docker compose -f "$COMPOSE_FILE" --profile playground exec -w /sandbox-home --user "$(id -u):$(id -g)" "$SERVICE" bash -c "$*"
|
|
else
|
|
docker compose -f "$COMPOSE_FILE" --profile playground exec -w /sandbox-home --user "$(id -u):$(id -g)" "$SERVICE" bash
|
|
fi
|