-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
144 lines (138 loc) · 3.61 KB
/
docker-compose.dev.yml
File metadata and controls
144 lines (138 loc) · 3.61 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: "3.5"
volumes:
nextcloud:
apps:
db:
config:
solr:
ollama:
presidio-models:
services:
db:
image: mariadb:10.6
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD='!ChangeMe!'
- MYSQL_PASSWORD='!ChangeMe!'
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
# Solr in standalone mode
solr:
image: solr:9-slim
container_name: openregister-solr
restart: always
ports:
- "8983:8983"
volumes:
- solr:/var/solr
environment:
- SOLR_HEAP=512m
command:
- solr-foreground
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8983/solr/admin/info/system || exit 1"]
interval: 30s
timeout: 10s
retries: 3
# Ollama for local LLM inference
ollama:
image: ollama/ollama:latest
container_name: openregister-ollama
restart: always
ports:
- "11434:11434"
volumes:
- ollama:/root/.ollama
environment:
- OLLAMA_HOST=0.0.0.0
# Development: Allow more concurrent requests for testing
- OLLAMA_NUM_PARALLEL=4
# Keep models loaded longer during development
- OLLAMA_KEEP_ALIVE=30m
# Memory limits for larger models (Llama 3.2 8B, Mistral, etc.)
# GPU support enabled for NVIDIA GPUs
deploy:
resources:
limits:
memory: 16G # Sufficient for 8B models
reservations:
memory: 8G # Minimum required
devices:
- driver: nvidia
count: all # Use all available GPUs
capabilities: [gpu]
# Shared memory for model loading
shm_size: '2gb'
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:11434/api/tags || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Presidio Analyzer for PII detection and NER (Development)
presidio-analyzer:
image: mcr.microsoft.com/presidio-analyzer:latest
container_name: openregister-presidio-analyzer-dev
restart: always
ports:
- "5001:5001"
environment:
- GRPC_PORT=5001
- LOG_LEVEL=DEBUG # More verbose logging for development
- PRESIDIO_ANALYZER_LANGUAGES=en,nl,de,fr,es
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5001/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
nextcloud:
user: root
container_name: nextcloud-dev
image: nextcloud
restart: always
ports:
- 8080:80
links:
- db
- solr
- ollama
- presidio-analyzer
volumes:
- nextcloud:/var/www/html:rw
- ./custom_apps:/var/www/html/custom_apps
- .:/var/www/html/custom_apps/openregister
- ./docker/entrypoint-openregister-dev.sh:/entrypoint-openregister.sh:ro
environment:
- MYSQL_PASSWORD='!ChangeMe!'
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
- TZ=Europe/Amsterdam
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=admin
# PHP Configuration - Match production settings
- PHP_MEMORY_LIMIT=4G
- PHP_UPLOAD_LIMIT=2G
- PHP_POST_MAX_SIZE=2G
command: >
bash -c "
/entrypoint.sh apache2-foreground &
NEXTCLOUD_PID=$$!
chmod +x /entrypoint-openregister.sh
/entrypoint-openregister.sh &
wait $$NEXTCLOUD_PID
"
depends_on:
- db
- solr
- ollama