Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
89 lines (84 loc) · 2.25 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
89 lines (84 loc) · 2.25 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
services:
db:
image: pgvector/pgvector:0.8.5-pg17
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-mediaarchivist}
POSTGRES_USER: ${POSTGRES_USER:-mediaarchivist}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set in .env}
ports:
- "${POSTGRES_BIND_ADDRESS:-127.0.0.1}:${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}"
interval: 5s
timeout: 5s
retries: 20
ollama:
image: ollama/ollama:0.30.8
restart: unless-stopped
ports:
- "127.0.0.1:${OLLAMA_PORT:-11434}:11434"
volumes:
- ollama-data:/root/.ollama
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 10s
retries: 20
start_period: 20s
ollama-init:
image: ollama/ollama:0.30.8
restart: "no"
environment:
OLLAMA_HOST: http://ollama:11434
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-qwen3-embedding:0.6b}
entrypoint: ["/bin/sh", "-c"]
command: ['ollama pull "$${EMBEDDING_MODEL}"']
depends_on:
ollama:
condition: service_healthy
migrate:
build: .
image: ghcr.io/netherquartz/mediaarchivistbot:latest
pull_policy: ${BOT_PULL_POLICY:-always}
restart: "no"
env_file:
- .env
environment:
POSTGRES_HOST: db
POSTGRES_PORT: 5432
OLLAMA_HOST: http://ollama:11434
command: ["alembic", "upgrade", "head"]
depends_on:
db:
condition: service_healthy
mediaarchivistbot:
build: .
image: ghcr.io/netherquartz/mediaarchivistbot:latest
pull_policy: ${BOT_PULL_POLICY:-always}
container_name: mediaarchivistbot
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_HOST: db
POSTGRES_PORT: 5432
OLLAMA_HOST: http://ollama:11434
mem_limit: 2g
volumes:
- whisper-cache:/root/.cache/huggingface
tmpfs:
- /tmp/mediaarchivist:size=256m
depends_on:
migrate:
condition: service_completed_successfully
ollama-init:
condition: service_completed_successfully
volumes:
postgres-data:
ollama-data:
whisper-cache: