-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
72 lines (64 loc) · 2.09 KB
/
docker-compose.local.yml
File metadata and controls
72 lines (64 loc) · 2.09 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
# =============================================================================
# MTA-STS Server - Local Deployment
# =============================================================================
#
# Usage: docker compose -f docker-compose.local.yml --env-file .env up -d
#
# Features:
# - Pre-built image from GitHub Container Registry
# - Direct port exposure via EXPOSED_PORT
# - For use behind external reverse proxy or local testing
# - Health check monitoring
# - JSON logging with rotation
#
# Access:
# - Web UI: http://${EXPOSED_PORT}
# - Policy: http://${EXPOSED_PORT}/.well-known/mta-sts.txt
# - Health: http://${EXPOSED_PORT}/health
#
# Example EXPOSED_PORT values:
# - "8080" => all interfaces, port 8080
# - "192.168.1.100:7088" => specific IP:port
# - "127.0.0.1:8080" => localhost only
#
# =============================================================================
services:
### MTA-STS Server ###
# Serves MTA-STS policy files according to RFC 8461
mtasts-server:
# Option 1: Use pre-built image (recommended)
image: ghcr.io/bauer-group/cs-mtasts/mtasts:latest
# Option 2: Build from source
# build: ./src
restart: unless-stopped
container_name: ${STACK_NAME}_SERVER
hostname: ${SERVICE_HOSTNAME}
# Port Mapping
# Maps EXPOSED_PORT to internal port 8080
ports:
- "${EXPOSED_PORT}:8080"
# Environment Configuration
environment:
# System
- TZ=${TIME_ZONE:-Etc/UTC}
# Service
- SERVICE_HOSTNAME=${SERVICE_HOSTNAME}
- DYNAMIC_HOSTNAME=${DYNAMIC_HOSTNAME:-false}
- GLOBAL_RATE_LIMIT=${GLOBAL_RATE_LIMIT:-600/minute}
# MTA-STS Policy
- STS_MODE=${STS_MODE:-enforce}
- STS_MAX_AGE=${STS_MAX_AGE:-86400}
- STS_MX_RECORDS=${STS_MX_RECORDS}
# Health Check
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8080/health"]
interval: 30s
timeout: 3s
start_period: 5s
retries: 3
# Logging Configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"