-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
158 lines (136 loc) · 4.86 KB
/
Copy pathdocker-compose.yml
File metadata and controls
158 lines (136 loc) · 4.86 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Docker Compose configuration for Abstracts Explorer
# Compatible with Docker Compose v2+ and Podman Compose
services:
# Nginx reverse proxy with SSL termination
# Listens on ports 80 (redirect to HTTPS) and 443 (HTTPS).
#
# REQUIRED before starting: create a ./certs/ directory containing:
# cert.pem — your SSL certificate (or full chain)
# key.pem — your SSL private key
# The nginx container will fail to start if either file is missing.
nginx:
image: nginx:stable-alpine
container_name: abstracts-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs:/etc/nginx/certs:ro
depends_on:
abstracts-explorer:
condition: service_healthy
restart: unless-stopped
# Main Abstracts Explorer application
# Port 5000 is intentionally not exposed to the host; all external traffic
# is routed through the nginx reverse proxy above.
abstracts-explorer:
image: ghcr.io/thawn/abstracts-explorer:latest
container_name: abstracts-explorer
volumes:
# Persist data directory
- abstracts-data:/app/data
environment:
# Data dir must be the same as assigned to the volume, otherwise downloaded data will not persist
- DATA_DIR=/app/data
# Database configuration - using PostgreSQL
- PAPER_DB=postgresql://abstracts:abstracts_password@postgres:5432/abstracts
# Embeddings configuration - using ChromaDB service
- EMBEDDING_DB=http://chromadb:8000
- COLLECTION_NAME=papers
# LLM Backend configuration
# The auth token for the LLM backend is read from the environment variable LLM_BACKEND_AUTH_TOKEN,
# which must be set in the environment or .env file.
# Option 1: Use external service (e.g., blablador)
- LLM_BACKEND_URL=https://api.helmholtz-blablador.fz-juelich.de
- LLM_BACKEND_AUTH_TOKEN=${LLM_BACKEND_AUTH_TOKEN}
# Option 2: Use host's LM Studio (requires host.docker.internal or host network)
# - LLM_BACKEND_URL=http://host.docker.internal:1234
# Models
# For Blablador
- CHAT_MODEL=alias-code
- EMBEDDING_MODEL=alias-qwen3-8b-embeddings
# For host's LM Studio we recommend
# - CHAT_MODEL=gemma-3-4b-it-qat
# - EMBEDDING_MODEL=text-embedding-qwen3-embedding-4b
# RAG settings
- MAX_CONTEXT_PAPERS=5
- ENABLE_QUERY_REWRITING=true
- QUERY_SIMILARITY_THRESHOLD=0.7
# Logging configuration
# Set log level: DEBUG, INFO, WARNING (default), ERROR, CRITICAL
- LOG_LEVEL=WARNING
# Registry settings (optional)
# Used by: abstracts-explorer registry upload/download
# GITHUB_TOKEN: PAT with read:packages (download) or write:packages (upload) scope
# REGISTRY_REPOSITORY: default OCI repository, e.g. ghcr.io/thawn/abstracts-data
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
- REGISTRY_REPOSITORY=${REGISTRY_REPOSITORY:-}
# Reverse-proxy hop counts for werkzeug ProxyFix.
# 1 = trust one proxy layer (default, matches the nginx service above).
# Set to 0 to disable, or increase for additional proxy layers.
- PROXY_X_FOR=1
- PROXY_X_PROTO=1
- PROXY_X_HOST=1
- PROXY_X_PREFIX=1
# Use host network mode for easier access to host's LM Studio
# Uncomment if using LM Studio on host
# network_mode: host
# Depends on database services
depends_on:
chromadb:
condition: service_healthy
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# ChromaDB vector database service
chromadb:
image: chromadb/chroma:latest
container_name: abstracts-chromadb
volumes:
- chromadb-data:/data
environment:
- IS_PERSISTENT=TRUE
- ANONYMIZED_TELEMETRY=FALSE
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "timeout 1 bash -c '</dev/tcp/localhost/8000' || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# PostgreSQL database service
postgres:
image: postgres:16-alpine
container_name: abstracts-postgres
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=abstracts
- POSTGRES_USER=abstracts
- POSTGRES_PASSWORD=abstracts_password
# Change password in production!
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U abstracts"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
volumes:
# Named volumes for persistent data
abstracts-data:
driver: local
chromadb-data:
driver: local
postgres-data:
driver: local
networks:
default:
name: abstracts-network