This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.dev.yml
65 lines (62 loc) · 1.67 KB
/
docker-compose.dev.yml
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
name: quack
version: '3.8'
services:
test_db:
image: postgres:15-alpine
expose:
- 5432
environment:
- POSTGRES_USER=dummy_login
- POSTGRES_PASSWORD=dummy_pwd
- POSTGRES_DB=dummy_db
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U dummy_login -d dummy_db'"]
interval: 10s
timeout: 3s
retries: 3
ollama:
image: ollama/ollama:0.2.1
expose:
- 11434
volumes:
- "$HOME/.ollama:/root/.ollama"
command: serve
healthcheck:
test: ["CMD-SHELL", "ollama --help"]
interval: 10s
timeout: 5s
retries: 3
backend:
image: quackai/companion:latest
build:
context: .
dockerfile: ./src/Dockerfile
depends_on:
test_db:
condition: service_healthy
ollama:
condition: service_healthy
ports:
- "5050:5050"
environment:
- SUPERADMIN_GH_PAT=${SUPERADMIN_GH_PAT}
- GH_OAUTH_ID=${GH_OAUTH_ID}
- GH_OAUTH_SECRET=${GH_OAUTH_SECRET}
- POSTGRES_URL=postgresql+asyncpg://dummy_login:dummy_pwd@test_db/dummy_db
- SUPERADMIN_LOGIN=superadmin_login
- SUPERADMIN_PWD=superadmin_pwd
- OLLAMA_ENDPOINT=http://ollama:11434
- OLLAMA_MODEL=${OLLAMA_MODEL}
- OLLAMA_TIMEOUT=${OLLAMA_TIMEOUT:-60}
- DEBUG=true
volumes:
- ./src/:/app/
command: >
sh -c "python app/db.py
&& curl -X POST http://ollama:11434/api/pull -d '{\"name\": \"${OLLAMA_MODEL}\"}'
&& uvicorn app.main:app --reload --host 0.0.0.0 --port 5050 --proxy-headers"
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:5050/status"]
interval: 10s
timeout: 3s
retries: 5