mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
fix(docker): fixed docker container healthchecks, added instructions to README for pgvector (#735)
* fixed docker container healthchecks * add additional instructions for pgvector extension to README
This commit is contained in:
39
README.md
39
README.md
@@ -91,6 +91,12 @@ docker compose -f docker-compose.prod.yml up -d
|
|||||||
|
|
||||||
### Option 4: Manual Setup
|
### 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:
|
1. Clone and install dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -99,20 +105,43 @@ cd sim
|
|||||||
bun install
|
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
|
```bash
|
||||||
cd apps/sim
|
cd apps/sim
|
||||||
cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
|
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
|
```bash
|
||||||
bunx drizzle-kit push
|
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Start the development servers:
|
4. Set up the database:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bunx drizzle-kit migrate
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Start the development servers:
|
||||||
|
|
||||||
**Recommended approach - run both servers together (from project root):**
|
**Recommended approach - run both servers together (from project root):**
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ services:
|
|||||||
limits:
|
limits:
|
||||||
memory: 8G
|
memory: 8G
|
||||||
healthcheck:
|
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
|
interval: 90s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ services:
|
|||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
healthcheck:
|
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
|
interval: 90s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user