-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 1.74 KB
/
Copy pathdocker-compose.yml
File metadata and controls
58 lines (55 loc) · 1.74 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
services:
nginx:
image: nginx:alpine
container_name: mailguard-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./certs:/etc/nginx/certs:ro
depends_on:
- mailguard-pro
restart: unless-stopped
db:
image: postgres:15-alpine
container_name: mailguard-postgres
environment:
- POSTGRES_USER=mailguard
- POSTGRES_PASSWORD=mailguard_pass
- POSTGRES_DB=mailguard
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
mailguard-pro:
build: .
container_name: mailguard-pro
ports:
- "3000:3000"
- "53:5353/udp" # host DNS port 53 -> unprivileged sinkhole 5353 in the container
environment:
- DEMO_MODE=true # Change to false and set IMAP creds for live mode
- NODE_ENV=production
- SINKHOLE_PORT=5353 # keep the sinkhole on an unprivileged port (container runs as non-root)
# ── Authentication (enabled by default) ──
# Pin a password + secret for a stable, non-generated login:
# - AUTH_PASSWORD=change-me-please
# - AUTH_SECRET=replace-with-a-long-random-string
# Restrict CORS to your dashboard origin if serving cross-origin:
# - CORS_ORIGIN=https://mailguard.example.com
# ── Live Gmail (optional) ──
# - IMAP_USER=your_email@gmail.com
# - IMAP_PASSWORD=your_app_password
# ── Database ──
- DB_CLIENT=pg
- DB_HOST=db
- DB_USER=mailguard
- DB_PASS=mailguard_pass
- DB_NAME=mailguard
depends_on:
- db
volumes:
- ./server/data:/app/server/data # persists the SQLite DB (if used) + seed JSON
restart: unless-stopped
volumes:
postgres_data: