diff --git a/README.md b/README.md index 8617c6c8be..7ecbe7f277 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,12 @@ docker compose -f docker-compose.prod.yml up -d ### Option 4: Manual Setup +**Requirements:** +- [Bun](https://bun.sh/) runtime +- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings) + +**Note:** Sim Studio uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension. + 1. Clone and install dependencies: ```bash @@ -99,20 +105,43 @@ cd sim bun install ``` -2. Set up environment: +2. Set up PostgreSQL with pgvector: + +You need PostgreSQL with the `vector` extension for embedding support. Choose one option: + +**Option A: Using Docker (Recommended)** +```bash +# Start PostgreSQL with pgvector extension +docker run --name simstudio-db \ + -e POSTGRES_PASSWORD=your_password \ + -e POSTGRES_DB=simstudio \ + -p 5432:5432 -d \ + pgvector/pgvector:pg17 +``` + +**Option B: Manual Installation** +- Install PostgreSQL 12+ and the pgvector extension +- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation) + +3. Set up environment: ```bash cd apps/sim cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL) ``` -3. Set up the database: +Update your `.env` file with the database URL: +```bash +DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio" +``` + +4. Set up the database: ```bash -bunx drizzle-kit push +bunx drizzle-kit migrate ``` -4. Start the development servers: +5. Start the development servers: **Recommended approach - run both servers together (from project root):** diff --git a/docker-compose.local.yml b/docker-compose.local.yml index 4882859e6f..3a23fe43d6 100644 --- a/docker-compose.local.yml +++ b/docker-compose.local.yml @@ -57,7 +57,7 @@ services: limits: memory: 8G healthcheck: - test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002'] + test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002/health'] interval: 90s timeout: 5s retries: 3 diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index c21f3769df..532ed7a648 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -55,7 +55,7 @@ services: db: condition: service_healthy healthcheck: - test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002'] + test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002/health'] interval: 90s timeout: 5s retries: 3