-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 1.68 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (64 loc) · 1.68 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
services:
mta:
build: .
image: srmta:latest
# Use host networking so the MTA can bind to port 25 and make outbound
# SMTP connections on port 25 without NAT (required for real mail delivery).
network_mode: host
restart: unless-stopped
env_file:
- ./deploy/systemd/srmta.env.example # copy and fill in real secrets
volumes:
- ./configs/config.example.yaml:/etc/srmta/config.yaml:ro
- ./configs/config.d:/etc/srmta/config.d:ro
- srmta-spool:/var/spool/srmta
- srmta-logs:/var/log/srmta
- srmta-dkim:/etc/srmta/dkim
depends_on:
postgres:
condition: service_healthy
# Admin API (Node.js / Fastify)
api:
build:
context: ./web/api
dockerfile: Dockerfile
image: srmta-api:latest
network_mode: host
restart: unless-stopped
environment:
- NODE_ENV=production
- PORT=3000
env_file:
- ./deploy/systemd/srmta.env.example
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: srmta
POSTGRES_DB: srmta
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
volumes:
- postgres-data:/var/lib/postgresql/data
- ./migrations/init_postgres.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U srmta"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
postgres-data:
srmta-spool:
srmta-logs:
srmta-dkim: