-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
78 lines (62 loc) · 2.7 KB
/
compose.yml
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
services:
fanout:
image: ghcr.io/kingpin/fanout:latest
# Build from local Dockerfile if needed
# build:
# context: .
# dockerfile: Dockerfile
# platforms:
# - linux/amd64
# - linux/arm64
# Container name for easier reference
container_name: fanout
# Restart policy
restart: unless-stopped
# Port mapping
ports:
- "8080:8080"
# Resource limits - Adjust based on workload requirements
deploy:
resources:
limits:
cpus: '1'
memory: 256M
reservations:
cpus: '0.25'
memory: 128M
# Health check configuration - Calls the built-in healthcheck endpoint
healthcheck:
test: ["CMD", "/fanout", "-healthcheck"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Environment variables
environment:
# Core Configuration
- TARGETS=https://primary.service,https://secondary.service # Required: Comma-separated target URLs or "localonly"
- PORT=8080 # Optional: Server port (default: 8080)
# Request Handling
- MAX_BODY_SIZE=10MB # Optional: Maximum request body size (default: 10MB)
- REQUEST_TIMEOUT=30s # Optional: Global request timeout (default: 30s)
- CLIENT_TIMEOUT=10s # Optional: Per-target timeout (default: 10s)
- MAX_RETRIES=3 # Optional: Maximum retry attempts for failed requests (default: 3)
# Endpoint Configuration
- ENDPOINT_PATH=/fanout # Optional: Custom endpoint path (default: /fanout)
# Echo Mode Configuration
- ECHO_MODE_HEADER=false # Optional: Add diagnostic headers in echo mode
- ECHO_MODE_RESPONSE=simple # Optional: Echo response format (simple/full)
# Monitoring
- METRICS_ENABLED=true # Optional: Enable Prometheus metrics endpoint
# Security Settings
- SENSITIVE_HEADERS=Authorization,X-API-Key # Optional: Additional sensitive headers to monitor
# Operational Settings
- TZ=UTC # Optional: Container timezone (default: UTC)
# Volume mounts (unused for now)
# - ./cofigs:/configs:ro # Optional: Mount custom configurations
# Network configuration
networks:
- fanout-net
# Define custom network
networks:
fanout-net: