- Saved recipes: save/unsave, star rating, notes, tags, collections (migrations 018-020) - Recipe browser: domain/category browsing with pantry match badges, pagination - Recipe detail panel: full directions, ingredient checklist, swap candidates, prep notes - Grocery links: affiliate links for missing ingredients - Nutrition filters and display chips on recipe cards - Bookmark toggle persisted to saved_recipes table - Tier gates on saved recipes (paid) and collections (premium) - Browser telemetry for domain/category click tracking - Cloud compose: CLOUD_DATA_ROOT volume mount for per-user SQLite trees - manage.sh: cf-orch agent sidecar in local stack - README: updated feature list and stack description
102 lines
3.4 KiB
Bash
Executable file
102 lines
3.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SERVICE=kiwi
|
|
WEB_PORT=8511 # Vue SPA (nginx) — dev
|
|
API_PORT=8512 # FastAPI — dev
|
|
CLOUD_WEB_PORT=8515 # Vue SPA (nginx) — cloud
|
|
COMPOSE_FILE="compose.yml"
|
|
CLOUD_COMPOSE_FILE="compose.cloud.yml"
|
|
CLOUD_PROJECT="kiwi-cloud"
|
|
|
|
# Auto-include compose.override.yml when present (local dev extras, NAS mounts, etc.)
|
|
OVERRIDE_FLAG=""
|
|
[[ -f "compose.override.yml" ]] && OVERRIDE_FLAG="-f compose.override.yml"
|
|
|
|
usage() {
|
|
echo "Usage: $0 {start|stop|restart|status|logs|open|build|test"
|
|
echo " |cloud-start|cloud-stop|cloud-restart|cloud-status|cloud-logs|cloud-build}"
|
|
echo ""
|
|
echo "Dev:"
|
|
echo " start Build (if needed) and start all services"
|
|
echo " stop Stop and remove containers"
|
|
echo " restart Stop then start"
|
|
echo " status Show running containers"
|
|
echo " logs [svc] Follow logs (api | web — defaults to all)"
|
|
echo " open Open web UI in browser"
|
|
echo " build Rebuild Docker images without cache"
|
|
echo " test Run pytest test suite"
|
|
echo ""
|
|
echo "Cloud (menagerie.circuitforge.tech/kiwi):"
|
|
echo " cloud-start Build cloud images and start kiwi-cloud project"
|
|
echo " cloud-stop Stop cloud instance"
|
|
echo " cloud-restart Stop then start cloud instance"
|
|
echo " cloud-status Show cloud containers"
|
|
echo " cloud-logs Follow cloud logs [api|web — defaults to all]"
|
|
echo " cloud-build Rebuild cloud images without cache"
|
|
exit 1
|
|
}
|
|
|
|
cmd="${1:-help}"
|
|
shift || true
|
|
|
|
case "$cmd" in
|
|
start)
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG up -d --build
|
|
echo "Kiwi running → http://localhost:${WEB_PORT}"
|
|
;;
|
|
stop)
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG down
|
|
;;
|
|
restart)
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG down
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG up -d --build
|
|
echo "Kiwi running → http://localhost:${WEB_PORT}"
|
|
;;
|
|
status)
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG ps
|
|
;;
|
|
logs)
|
|
svc="${1:-}"
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG logs -f ${svc}
|
|
;;
|
|
open)
|
|
xdg-open "http://localhost:${WEB_PORT}" 2>/dev/null \
|
|
|| open "http://localhost:${WEB_PORT}" 2>/dev/null \
|
|
|| echo "Open http://localhost:${WEB_PORT} in your browser"
|
|
;;
|
|
build)
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG build --no-cache
|
|
;;
|
|
test)
|
|
docker compose -f "$COMPOSE_FILE" $OVERRIDE_FLAG run --rm api \
|
|
conda run -n job-seeker pytest tests/ -v
|
|
;;
|
|
|
|
cloud-start)
|
|
docker compose -f "$CLOUD_COMPOSE_FILE" -p "$CLOUD_PROJECT" up -d --build
|
|
echo "Kiwi cloud running → https://menagerie.circuitforge.tech/kiwi"
|
|
;;
|
|
cloud-stop)
|
|
docker compose -f "$CLOUD_COMPOSE_FILE" -p "$CLOUD_PROJECT" down
|
|
;;
|
|
cloud-restart)
|
|
docker compose -f "$CLOUD_COMPOSE_FILE" -p "$CLOUD_PROJECT" down
|
|
docker compose -f "$CLOUD_COMPOSE_FILE" -p "$CLOUD_PROJECT" up -d --build
|
|
echo "Kiwi cloud running → https://menagerie.circuitforge.tech/kiwi"
|
|
;;
|
|
cloud-status)
|
|
docker compose -f "$CLOUD_COMPOSE_FILE" -p "$CLOUD_PROJECT" ps
|
|
;;
|
|
cloud-logs)
|
|
svc="${1:-}"
|
|
docker compose -f "$CLOUD_COMPOSE_FILE" -p "$CLOUD_PROJECT" logs -f ${svc}
|
|
;;
|
|
cloud-build)
|
|
docker compose -f "$CLOUD_COMPOSE_FILE" -p "$CLOUD_PROJECT" build --no-cache
|
|
;;
|
|
|
|
*)
|
|
usage
|
|
;;
|
|
esac
|