forked from kiwifs/kiwifs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
65 lines (61 loc) · 1.56 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
65 lines (61 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# docker-compose.dev.yml — one-command dev setup with hot-reload
#
# Usage:
# docker compose -f docker-compose.dev.yml up
#
# Backend: Go with air (hot-reload on .go file changes)
# Frontend: Vite dev server with HMR on port 5173
# KiwiFS accessible at http://localhost:3333 (API) and http://localhost:5173 (UI with HMR)
services:
backend:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "3333:3333"
volumes:
- .:/app
- go-mod:/go/pkg/mod
- go-build:/root/.cache/go-build
working_dir: /app
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
command: >
air -c .air.toml
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3333/health"]
interval: 5s
timeout: 3s
retries: 10
frontend:
image: node:22-alpine
ports:
- "5173:5173"
volumes:
- ./ui:/app
- node-modules:/app/node_modules
working_dir: /app
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
environment:
VITE_API_URL: http://backend:3333
depends_on:
backend:
condition: service_healthy
db:
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: ${POSTGRES_USER:-kiwi}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-kiwi}
POSTGRES_DB: ${POSTGRES_DB:-kiwi}
volumes:
- pgdata-dev:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-kiwi}"]
interval: 5s
timeout: 3s
retries: 10
volumes:
go-mod:
go-build:
node-modules:
pgdata-dev: