merge: Resolve develop→master compose port align

Bring docker-compose ADMIN_PORT=81 healthcheck align from develop
while keeping master README ADMIN_PASSWORD / boot rules and not
publishing admin :81 by default.
This commit is contained in:
s1d3sw1ped_bot
2026-09-02 16:36:40 +00:00
2 changed files with 36 additions and 8 deletions
+24
View File
@@ -12,6 +12,7 @@ A pure-Go reverse proxy with embedded web UI. Supports proxy hosts, TCP/UDP stre
## Quick start (binary)
```bash
make # builds UI (placeholder) + Go binary with embed
<<<<<<< HEAD
ADMIN_PASSWORD='choose-a-real-password' ./helix-proxy
# Defaults (overridable via env):
# Admin UI + API: 127.0.0.1:8081 (ADMIN_HOST / ADMIN_PORT)
@@ -20,20 +21,39 @@ ADMIN_PASSWORD='choose-a-real-password' ./helix-proxy
```
Visit http://127.0.0.1:8081
=======
./helix-proxy
# Admin UI + API on 127.0.0.1:8081
# Proxy HTTP on :8080, HTTPS on :18443
```
Visit http://localhost:8081
>>>>>>> origin/develop
Data (db, certs, logs, www html) lives in `./data` relative to where you ran the binary.
## Docker (recommended)
```bash
docker compose up -d
# compose sets ADMIN_PORT=81 PROXY_HTTP_PORT=80 PROXY_HTTPS_PORT=443
# proxy :80/:443 published; admin binds 127.0.0.1:81 (not published by default)
# or
docker build -t helix-proxy:dev .
<<<<<<< HEAD
docker run --env ADMIN_PASSWORD='choose-a-real-password' \
-e ADMIN_PORT=81 -e ADMIN_HOST=0.0.0.0 -e PROXY_HTTP_PORT=80 -e PROXY_HTTPS_PORT=443 \
-p 80:80 -p 81:81 -p 443:443 -v $PWD/data:/app/data --workdir /app helix-proxy:dev
```
Without those env overrides the binary still defaults to admin `127.0.0.1:8081` and proxy `:8080` / `:18443` inside the container.
=======
docker run -p 80:80 -p 443:443 \
-e ADMIN_PORT=81 -e PROXY_HTTP_PORT=80 -e PROXY_HTTPS_PORT=443 \
-v $PWD/data:/app/data --workdir /app helix-proxy:dev
```
Publishing admin (`-p 81:81`) also needs `-e ADMIN_HOST=0.0.0.0`. Do not publish :81 on untrusted networks.
>>>>>>> origin/develop
PUID/PGID + DISABLE_IPV6 example (see docker-compose.yml for full):
```yaml
@@ -47,7 +67,11 @@ environment:
Binary auto-chowns data tree (if started root) then drops privs (unless PUID_NO_DROP); umask support via UMASK env. Files 0600, dirs 0755.
Note: privilege drop happens early (before listeners); low-port binds require either root (with PUID_NO_DROP), capabilities, high ports in config, or external setuid wrapper.
<<<<<<< HEAD
See docker-compose.yml for a full example (publishes 80/443; admin stays on loopback unless you set `ADMIN_HOST` / publish the admin port).
=======
See docker-compose.yml for full example (listens on 80/81/443 via env, publishes 80/443, volume for data/).
>>>>>>> origin/develop
## Paths (all overridable)
- `data/db.bolt` (or `DATA_DIR`)
+12 -8
View File
@@ -12,14 +12,18 @@ services:
- ./data:/app/data
# user: "0:0" # required when using PUID/PGID != built-in to allow binary to chown+drop
# working_dir: /app # binary uses CWD for relative data/ + data/www/
# environment:
# - JWT_SECRET= # optional; otherwise a random secret is stored in data/.jwt_secret
# - DATA_DIR=/app/data
# - WWW_DIR=/app/data/www
# - PUID=1000
# - PGID=1000
# - DISABLE_IPV6=1
# # PUID_NO_DROP=1 # if using low ports (80/443) + PUID: chown as root but skip drop (stay root for bind; default drop runs as PUID after, requires high ports or NET_BIND_SERVICE cap)
environment:
- ADMIN_PORT=81
- PROXY_HTTP_PORT=80
- PROXY_HTTPS_PORT=443
# ADMIN_HOST defaults to 127.0.0.1 (healthcheck hits 127.0.0.1:81)
# - JWT_SECRET= # optional; otherwise a random secret is stored in data/.jwt_secret
# - DATA_DIR=/app/data
# - WWW_DIR=/app/data/www
# - PUID=1000
# - PGID=1000
# - DISABLE_IPV6=1
# # PUID_NO_DROP=1 # if using low ports (80/443) + PUID: chown as root but skip drop (stay root for bind; default drop runs as PUID after, requires high ports or NET_BIND_SERVICE cap)
# To use optional SQL backend instead of default yaml:
# - DB_TYPE=postgres
# - DB_POSTGRES_HOST=db