-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (64 loc) · 1.67 KB
/
docker-compose.yml
File metadata and controls
70 lines (64 loc) · 1.67 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
66
67
68
69
70
version: "3.9"
services:
db:
image: pgvector/pgvector:pg16
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-cody}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-cody}
POSTGRES_DB: ${POSTGRES_DB:-cody}
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-cody}"]
interval: 5s
timeout: 5s
retries: 10
ingestion:
build: ./ingestion
profiles: ["ingest"]
env_file: .env
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-cody}:${POSTGRES_PASSWORD:-cody}@db:5432/${POSTGRES_DB:-cody}
depends_on:
db:
condition: service_healthy
volumes:
- /tmp/repos:/tmp/repos
resync:
image: cody-api
command: python ingestion/resync_all.py
profiles: ["cron"]
env_file: .env
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-cody}:${POSTGRES_PASSWORD:-cody}@db:5432/${POSTGRES_DB:-cody}
depends_on:
db:
condition: service_healthy
volumes:
- /tmp/repos:/tmp/repos
api:
build: ./api
restart: unless-stopped
env_file: .env
environment:
DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-cody}:${POSTGRES_PASSWORD:-cody}@db:5432/${POSTGRES_DB:-cody}
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
frontend:
build: ./frontend
restart: unless-stopped
environment:
VITE_API_URL: ${VITE_API_URL:-http://localhost:8000/}
ports:
- "5173:5173"
depends_on:
- api
volumes:
pgdata: