23 lines
715 B
Bash
23 lines
715 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
MEMORY_PORT="${MEMORY_PORT:-8081}"
|
|
SKILL_DIR="$(dirname "$(dirname "$0")")"
|
|
VENV_DIR="$SKILL_DIR/.venv"
|
|
|
|
# Source postgres connection
|
|
[ -f /run/vibestack/postgres.env ] && source /run/vibestack/postgres.env
|
|
|
|
# Export for Python
|
|
export MEMORY_PORT
|
|
export MEMORY_MODEL="${MEMORY_MODEL:-all-MiniLM-L6-v2}"
|
|
export MEMORY_RETENTION_DAYS="${MEMORY_RETENTION_DAYS:-30}"
|
|
export MEMORY_MAX_RESULTS="${MEMORY_MAX_RESULTS:-10}"
|
|
export DATABASE_URL="${DATABASE_URL:-postgresql://vibestack:vibestack@localhost:5432/vibestack}"
|
|
|
|
echo "Starting Memory API on port $MEMORY_PORT..."
|
|
echo "Model: $MEMORY_MODEL"
|
|
echo "Retention: ${MEMORY_RETENTION_DAYS} days"
|
|
|
|
exec "$VENV_DIR/bin/python" "$SKILL_DIR/src/api.py"
|