-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
33 lines (32 loc) · 1.17 KB
/
Copy pathdocker-compose.yml
File metadata and controls
33 lines (32 loc) · 1.17 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
# freebuff-proxy deployment configuration
services:
freebuff-proxy:
build:
context: .
# Build with host networking: `RUN go mod download` in the Dockerfile
# times out with a TLS handshake error on hosts whose bridge-network
# egress is flaky (the documented deployment box needs this too).
network: host
# Version stamped into the binary (ldflags -X main.version). The .git
# dir is excluded from the build context, so it is resolved here on
# the host: the nearest tag, or the short SHA past it.
args:
VERSION: ${VERSION:-dev}
image: freebuff-proxy:latest
container_name: freebuff-proxy
env_file: .env
environment:
- LISTEN_ADDR=:3457
ports:
- "3457:3457"
restart: unless-stopped
# Docker's default 10s stop timeout races the app's 10s drain while
# in-flight SSE streams starve the pool FINISH drain — give it room.
stop_grace_period: 20s
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3457/healthz"]
interval: 30s
timeout: 5s
retries: 3
# Slow first start (registry refresh at boot) must not mark unhealthy.
start_period: 10s