- examples/fixture-invoicing/: FastAPI + Vue + Postgres demo (4-entity invoice fixture)
- cfg/sample/: wraps the fixture (managed.repos points at examples/)
- ctrl/kind-{up,down,status}.sh + per-room k8s render in soleprint/ctrl/k8s/
- build.py: relative repo paths, resilient rmtree, optional k8s render hook
- cfg/.gitignore: stop ignoring sample/ and standalone/ template rooms
Manifests render cleanly but kind cluster has not been run end-to-end yet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.3 KiB
Bash
Executable File
46 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Start sample room (fixture invoicing + link + soleprint)
|
|
#
|
|
# Usage:
|
|
# ./start.sh # Start all (foreground, with nginx)
|
|
# ./start.sh -d # Start all (detached)
|
|
# ./start.sh --no-nginx # Skip nginx reverse proxy
|
|
# ./start.sh --build # Rebuild images
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
|
APP_DIR="$ROOT_DIR/sample"
|
|
LINK_DIR="$ROOT_DIR/link"
|
|
SPR_DIR="$ROOT_DIR/soleprint"
|
|
|
|
BUILD=""
|
|
DETACH=""
|
|
NGINX_OVERRIDE="-f docker-compose.nginx.yml"
|
|
|
|
for arg in "$@"; do
|
|
case $arg in
|
|
-d|--detached) DETACH="-d" ;;
|
|
--build) BUILD="--build" ;;
|
|
--no-nginx) NGINX_OVERRIDE="" ;;
|
|
esac
|
|
done
|
|
|
|
# Ensure shared docker network exists (soleprint + managed app share it)
|
|
NETWORK="$(grep -m1 '^NETWORK_NAME=' "$APP_DIR/.env" | cut -d= -f2)"
|
|
docker network inspect "$NETWORK" >/dev/null 2>&1 || docker network create "$NETWORK"
|
|
|
|
echo "=== Starting sample ==="
|
|
|
|
# 1) Managed app (db + backend + frontend)
|
|
(cd "$APP_DIR" && docker compose up -d $BUILD)
|
|
|
|
# 2) Link bridge
|
|
if [[ -f "$LINK_DIR/docker-compose.yml" ]]; then
|
|
(cd "$LINK_DIR" && docker compose --env-file "$APP_DIR/.env" up -d $BUILD)
|
|
fi
|
|
|
|
# 3) Soleprint (+ nginx sidebar injection)
|
|
(cd "$SPR_DIR" && docker compose -f docker-compose.yml $NGINX_OVERRIDE up $DETACH $BUILD)
|