docker: Promote compose port align to master #12
@@ -0,0 +1,40 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
## Propose changes
|
||||||
|
|
||||||
|
Open a pull request against `develop`. Keep the default branch for releases and
|
||||||
|
stable tips; land work on `develop` first.
|
||||||
|
|
||||||
|
Point at an existing issue when one fits. Prefer a short issue that states the
|
||||||
|
symptom or request before a large PR.
|
||||||
|
|
||||||
|
## Commits
|
||||||
|
|
||||||
|
Subject form:
|
||||||
|
|
||||||
|
```
|
||||||
|
area: Imperative summary
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Area** is a real package, directory, or subsystem token (`ci:`, `docs:`,
|
||||||
|
Go package name). Not a lone filename.
|
||||||
|
- **Imperative** mood: Fix, Add, Remove — not "Fixed" or "This patch…".
|
||||||
|
- No trailing period. Aim ≤ ~70–75 characters for the whole subject.
|
||||||
|
- Not conventional-commits (`feat:` / `fix:` / `chore:` as types).
|
||||||
|
|
||||||
|
Body explains **why**. Establish the problem, then say what you are doing.
|
||||||
|
One logical change per commit; split fix and cleanup.
|
||||||
|
|
||||||
|
## Pull requests
|
||||||
|
|
||||||
|
Title matches the primary commit subject.
|
||||||
|
|
||||||
|
- **What** changed
|
||||||
|
- **Why** (problem and impact)
|
||||||
|
- **Test** (concrete steps; "CI green" alone is weak)
|
||||||
|
|
||||||
|
## Issues and closing
|
||||||
|
|
||||||
|
Cite leftover issues by **full URL**. Gitea closes issues when `#N` appears in
|
||||||
|
merge text, so do not put `#N` in the merge message unless that issue is actually
|
||||||
|
done. Use `Fixes #N` / `Closes #N` only when the leftover work is finished.
|
||||||
@@ -13,22 +13,28 @@ A pure-Go reverse proxy with embedded web UI. Supports proxy hosts, TCP/UDP stre
|
|||||||
```bash
|
```bash
|
||||||
make # builds UI (placeholder) + Go binary with embed
|
make # builds UI (placeholder) + Go binary with embed
|
||||||
./helix-proxy
|
./helix-proxy
|
||||||
# Admin UI + API on :81
|
# Admin UI + API on 127.0.0.1:8081
|
||||||
# Proxy on :8080 (or 80/443 when you have perms / run in docker)
|
# Proxy HTTP on :8080, HTTPS on :18443
|
||||||
```
|
```
|
||||||
|
|
||||||
Visit http://localhost:81
|
Visit http://localhost:8081
|
||||||
|
|
||||||
Data (db, certs, logs, www html) lives in `./data` relative to where you ran the binary.
|
Data (db, certs, logs, www html) lives in `./data` relative to where you ran the binary.
|
||||||
|
|
||||||
## Docker (recommended)
|
## Docker (recommended)
|
||||||
```bash
|
```bash
|
||||||
docker compose up -d
|
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
|
# or
|
||||||
docker build -t helix-proxy:dev .
|
docker build -t helix-proxy:dev .
|
||||||
docker run -p 81:81 -v $PWD/data:/app/data --workdir /app helix-proxy:dev
|
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.
|
||||||
|
|
||||||
PUID/PGID + DISABLE_IPV6 example (see docker-compose.yml for full):
|
PUID/PGID + DISABLE_IPV6 example (see docker-compose.yml for full):
|
||||||
```yaml
|
```yaml
|
||||||
# user: "0:0" # root to allow chown+drop inside
|
# user: "0:0" # root to allow chown+drop inside
|
||||||
@@ -41,7 +47,7 @@ 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.
|
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.
|
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.
|
||||||
|
|
||||||
See docker-compose.yml for full example (exposes 80/81/443, volume for data/).
|
See docker-compose.yml for full example (listens on 80/81/443 via env, publishes 80/443, volume for data/).
|
||||||
|
|
||||||
## Paths (all overridable)
|
## Paths (all overridable)
|
||||||
- `data/db.bolt` (or `DATA_DIR`)
|
- `data/db.bolt` (or `DATA_DIR`)
|
||||||
|
|||||||
+5
-1
@@ -12,7 +12,11 @@ services:
|
|||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
# user: "0:0" # required when using PUID/PGID != built-in to allow binary to chown+drop
|
# 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/
|
# working_dir: /app # binary uses CWD for relative data/ + data/www/
|
||||||
# environment:
|
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
|
# - JWT_SECRET= # optional; otherwise a random secret is stored in data/.jwt_secret
|
||||||
# - DATA_DIR=/app/data
|
# - DATA_DIR=/app/data
|
||||||
# - WWW_DIR=/app/data/www
|
# - WWW_DIR=/app/data/www
|
||||||
|
|||||||
Reference in New Issue
Block a user