-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 2.81 KB
/
docker-compose.yml
File metadata and controls
99 lines (94 loc) · 2.81 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
services:
# Mail Archive — main application (Go)
mails:
build:
context: .
dockerfile: Dockerfile
# Use all available CPU cores for faster builds
args:
- BUILDKIT_INLINE_CACHE=1
container_name: mails
user: "${DOCKER_UID:-1000}:${DOCKER_GID:-1000}"
restart: unless-stopped
ports:
- "8090:8090"
volumes:
- ./users:/app/users
environment:
TZ: Europe/Berlin
LISTEN_ADDR: ":8090"
DATA_DIR: /app/users
BASE_URL: "${BASE_URL:-http://localhost:8090}"
# OAuth providers (set in .env or shell)
GITHUB_CLIENT_ID: "${GITHUB_CLIENT_ID:-}"
GITHUB_CLIENT_SECRET: "${GITHUB_CLIENT_SECRET:-}"
GOOGLE_CLIENT_ID: "${GOOGLE_CLIENT_ID:-}"
GOOGLE_CLIENT_SECRET: "${GOOGLE_CLIENT_SECRET:-}"
FACEBOOK_CLIENT_ID: "${FACEBOOK_CLIENT_ID:-}"
FACEBOOK_CLIENT_SECRET: "${FACEBOOK_CLIENT_SECRET:-}"
# Similarity search (optional)
QDRANT_URL: "http://127.0.0.1:6334"
OLLAMA_URL: "http://172.17.0.1:11434"
EMBED_MODEL: "all-minilm"
# S3-compatible storage (optional, e.g. MinIO)
S3_ENDPOINT: "${S3_ENDPOINT:-}"
S3_ACCESS_KEY_ID: "${S3_ACCESS_KEY_ID:-}"
S3_SECRET_ACCESS_KEY: "${S3_SECRET_ACCESS_KEY:-}"
S3_BUCKET: "${S3_BUCKET:-}"
S3_USE_SSL: "${S3_USE_SSL:-true}"
network_mode: host
# docker compose watch — rebuild on changes (uses .dockerignore implicitly)
develop:
watch:
- action: rebuild
path: .
labels:
- "service=mail-archive"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels: "service"
# S3-compatible object storage (MinIO) — optional
minio:
image: minio/minio:latest
container_name: minio
restart: unless-stopped
command: server /data
environment:
MINIO_ROOT_USER: "${MINIO_ROOT_USER:-minioadmin}"
MINIO_ROOT_PASSWORD: "${MINIO_ROOT_PASSWORD:-minioadmin}"
volumes:
- minio_data:/data
ports:
- "9900:9000" # S3 API (host 9900 to avoid conflicts)
- "9901:9001" # Web console
profiles:
- s3
# Vector DB for similarity search (optional)
qdrant:
image: qdrant/qdrant:latest
container_name: qdrant
restart: unless-stopped
volumes:
- qdrant_storage:/qdrant/storage
ports:
- "6333:6333"
- "6334:6334"
### Test Environment ###
# Test IMAP/POP3/SMTP server — use with: docker compose --profile test up
greenmail:
image: greenmail/standalone:2.1.2
container_name: greenmail
environment:
GREENMAIL_OPTS: "-Dgreenmail.setup.test.all -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.auth.disabled"
ports:
- "3025:3025" # SMTP
- "3110:3110" # POP3
- "3143:3143" # IMAP
profiles:
- test
volumes:
qdrant_storage:
minio_data: