-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.local.yaml
More file actions
111 lines (103 loc) · 2.46 KB
/
docker-compose.local.yaml
File metadata and controls
111 lines (103 loc) · 2.46 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: "3.9"
services:
frontend:
image: kitsune-client
build:
context: ./client
dockerfile: Dockerfile.dev
ports:
- "4200:80"
depends_on:
- backend
- cdm-backend
cdm-backend:
image: ghcr.io/scai-bio/cdm-api:latest
ports:
- "8000:80"
depends_on:
- cdm-postgres
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_HOST: cdm-postgres
POSTGRES_PORT: 5432
POSTGRES_DB: testdb
cdm-postgres:
image: postgres:17
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
PGDATA: /var/lib/postgresql/17/docker/data/pgdata
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- cdm-postgres-data:/var/lib/postgresql/17/docker/data
backend:
image: kitsune-api
build:
context: ./api
dockerfile: Dockerfile.dev
ports:
- "5000:80"
depends_on:
- postgres
- ollama
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_PORT: 5432
POSTGRES_HOST: postgres
POSTGRES_DB: testdb
OLLAMA_URL: http://ollama:11434
MODEL_NAME: "nomic-embed-text"
postgres:
image: pgvector/pgvector:pg17
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
PGDATA: /var/lib/postgresql/17/docker/data/pgdata
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testdb"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres-data:/var/lib/postgresql/17/docker/data
ollama:
image: ollama
build:
context: ./ollama
dockerfile: Dockerfile
ports:
- "11434:11434"
importer:
image: alpine:latest
depends_on:
- backend
- ollama
- postgres
entrypoint: >
sh -c "
apk add --no-cache curl >/dev/null;
echo 'Waiting for backend to be ready...';
until curl -s http://backend:80/docs > dev/null; do
echo 'Still waiting...';
sleep 2;
done;
echo 'Trigger OLS import...';
curl -X PUT 'http://backend:80/imports/terminology?terminology_id=doid&model=nomic-embed-text'
"
restart: "no"
volumes:
postgres-data:
cdm-postgres-data:
driver: local