-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.release.yml
More file actions
39 lines (39 loc) · 1.6 KB
/
Copy pathdocker-compose.release.yml
File metadata and controls
39 lines (39 loc) · 1.6 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
# Sub2Port release deploy — run a prebuilt binary from GitHub Releases:
# docker compose -f docker-compose.release.yml up -d --build
#
# Pin a version with SUB2PORT_VERSION (default: latest release):
# SUB2PORT_VERSION=v0.1.0 docker compose -f docker-compose.release.yml up -d --build
#
# Note: with the default "latest", Docker caches the download layer — to pick up a
# newer release, rebuild with --no-cache (or pin an explicit version tag).
#
# Uses host networking: the app binds 27000 + the mapping ports directly on the
# host, so there's no docker-proxy port-publishing step at all (bridge mode adds
# per-port startup latency). This is a Linux-server deploy
# file. On Linux, host mode reaches the LAN automatically; to restrict to this host
# only, set `listen: 127.0.0.1:27000` in config.yaml. (Host mode is a no-op on
# Docker Desktop/macOS — for local dev use docker-compose.yml instead.)
services:
sub2port:
build:
context: .
dockerfile: Dockerfile.release
args:
SUB2PORT_VERSION: ${SUB2PORT_VERSION:-latest}
image: sub2port:release
container_name: sub2port
restart: unless-stopped
network_mode: host
# Host mode does the actual binding on the host; `expose` only documents the
# ports here (it does NOT publish — `ports:` would be ignored under host mode).
expose:
- "27000" # Web UI / API
- "27001-27020" # proxy mapping ports
volumes:
- ./data:/data
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:27000/api/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s