-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (60 loc) · 1.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
65 lines (60 loc) · 1.34 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
services:
self:
build: .
container_name: self
depends_on:
- postgres
ports:
- "80:80"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/selfdb
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
SELF_AI_URL: http://ollama:11434/api/chat
SELF_AI_MODEL: gemma3:4b
networks:
- self_network
postgres:
image: postgres:17
container_name: postgres
restart: always
environment:
POSTGRES_DB: selfdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- self_network
ollama:
image: ollama/ollama:0.11.4
container_name: ollama
restart: always
volumes:
- ollama:/root/.ollama
ports:
- "11434:11434"
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
networks:
- self_network
depends_on:
- ollama-init
ollama-init:
image: ollama/ollama:0.11.4
container_name: ollama-init
restart: "no"
volumes:
- ollama:/root/.ollama
- ./ollama-entrypoint.sh:/entrypoint.sh
entrypoint: ["/usr/bin/bash", "/entrypoint.sh"]
networks:
self_network:
volumes:
postgres_data:
name: postgres_data
ollama:
name: ollama