mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
2d7926f867
Runnable companion to the "Build an Agentic Travel App with Oracle Agent Memory, Agent Spec, and CopilotKit" cookbook recipe: a portable Oracle Agent Spec agent on LangGraph over AG-UI, long-term memory on Oracle AI Database, and a CopilotKit V2 frontend with generative UI + human-in-the-loop. - agent/ Python (uv) Agent Spec agent + FastAPI AG-UI server - frontend/ Next.js CopilotKit V2 chat (flight cards, recall chip, HITL booking) - db/ Oracle AI Database (Free image) + cookbook-user init - docker-compose.yml for local Oracle; per-service railway.json for deploy Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21 lines
848 B
Bash
Executable File
21 lines
848 B
Bash
Executable File
#!/bin/bash
|
|
# Create the `cookbook` database user (idempotent).
|
|
#
|
|
# The Oracle Database Free image does not reliably auto-run scripts mounted into
|
|
# /opt/oracle/scripts/setup, so we run the init SQL explicitly against the running
|
|
# container. Run this once after `docker compose up -d` reports the DB ready
|
|
# ("DATABASE IS READY TO USE"). Safe to re-run.
|
|
set -euo pipefail
|
|
|
|
CONTAINER="${ORACLE_CONTAINER:-oracle-cookbook-db}"
|
|
|
|
if ! docker ps --format '{{.Names}}' | grep -qx "$CONTAINER"; then
|
|
echo "Error: container '$CONTAINER' is not running. Start it with: docker compose up -d" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Ensuring the 'cookbook' user exists in FREEPDB1..."
|
|
docker exec "$CONTAINER" bash -lc \
|
|
'echo exit | "$ORACLE_HOME"/bin/sqlplus -s "/ as sysdba" @/opt/oracle/scripts/setup/01-create-user.sql'
|
|
echo "Done — the 'cookbook' user is ready."
|