Skip to content

Commit 8007601

Browse files
authored
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
1 parent b923c24 commit 8007601

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ docker compose -f docker-compose.prod.yml up -d
9191

9292
### Option 4: Manual Setup
9393

94+
**Requirements:**
95+
- [Bun](https://bun.sh/) runtime
96+
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
97+
98+
**Note:** Sim Studio uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
99+
94100
1. Clone and install dependencies:
95101

96102
```bash
@@ -99,20 +105,43 @@ cd sim
99105
bun install
100106
```
101107

102-
2. Set up environment:
108+
2. Set up PostgreSQL with pgvector:
109+
110+
You need PostgreSQL with the `vector` extension for embedding support. Choose one option:
111+
112+
**Option A: Using Docker (Recommended)**
113+
```bash
114+
# Start PostgreSQL with pgvector extension
115+
docker run --name simstudio-db \
116+
-e POSTGRES_PASSWORD=your_password \
117+
-e POSTGRES_DB=simstudio \
118+
-p 5432:5432 -d \
119+
pgvector/pgvector:pg17
120+
```
121+
122+
**Option B: Manual Installation**
123+
- Install PostgreSQL 12+ and the pgvector extension
124+
- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation)
125+
126+
3. Set up environment:
103127

104128
```bash
105129
cd apps/sim
106130
cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
107131
```
108132

109-
3. Set up the database:
133+
Update your `.env` file with the database URL:
134+
```bash
135+
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
136+
```
137+
138+
4. Set up the database:
110139

111140
```bash
112-
bunx drizzle-kit push
141+
bunx drizzle-kit migrate
113142
```
114143

115-
4. Start the development servers:
144+
5. Start the development servers:
116145

117146
**Recommended approach - run both servers together (from project root):**
118147

docker-compose.local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ services:
5757
limits:
5858
memory: 8G
5959
healthcheck:
60-
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002']
60+
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002/health']
6161
interval: 90s
6262
timeout: 5s
6363
retries: 3

docker-compose.prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ services:
5555
db:
5656
condition: service_healthy
5757
healthcheck:
58-
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002']
58+
test: ['CMD', 'wget', '--spider', '--quiet', 'http://127.0.0.1:3002/health']
5959
interval: 90s
6060
timeout: 5s
6161
retries: 3

0 commit comments

Comments
 (0)