-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (69 loc) · 3.04 KB
/
docker-compose.yml
File metadata and controls
75 lines (69 loc) · 3.04 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
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
# pyMC Repeater — pymc_usb / pymc_tcp modem (Wi-Fi/TCP by default, USB-CDC optional)
#
# Defaults to pymc_tcp: no USB passthrough, no dialout permissions needed,
# the modem lives anywhere on the LAN. Switch to pymc_usb by uncommenting
# the SERIAL_PORT env var and the `devices:` block at the bottom.
#
# Per-deployment overrides go in a `.env` file next to this compose file
# (gitignored). Typical contents:
# HOST_PORT=8001
# PYMC_TCP_HOST=192.168.1.50
# PYMC_TCP_PORT=5055
# ADMIN_PASSWORD=changeit
#
# Legacy HELTEC_* env vars are still honoured by the container entrypoint
# as fallbacks — pre-rename .env files keep working without edits.
#
# Usage:
# docker compose up -d --build
# docker compose logs -f
# Dashboard: http://localhost:${HOST_PORT:-8000}
services:
repeater:
# Use the published Docker Hub image by default. `docker compose pull`
# fetches it; `docker compose up -d --build` ignores the registry and
# rebuilds locally from ./docker/Dockerfile (handy for dev on the Pi
# or for testing local patches before publishing).
build:
context: .
dockerfile: docker/Dockerfile
image: itkeny/pymc-usb-repeater:latest
container_name: pymc-repeater
restart: unless-stopped
ports:
- "${HOST_PORT:-8000}:8000"
# Bind mounts so config / database / logs live on the HOST under
# ./data, not in a docker-managed volume. Survives `docker rm`,
# easy to back up, and you can edit config.yaml with your normal
# editor. Directories are auto-created on first start; the
# container chowns them to its `repeater` uid so the daemon (which
# drops privileges via gosu) can write to them.
volumes:
- ./data/config:/etc/pymc_repeater
- ./data/state:/var/lib/pymc_repeater
- ./data/logs:/var/log/pymc_repeater
environment:
# ── Radio transport: "pymc_tcp" (default) or "pymc_usb" ──
- RADIO_TYPE=pymc_tcp
# ── TCP-mode settings (used when RADIO_TYPE=pymc_tcp) ──
# Set PYMC_TCP_HOST in your .env to the modem's LAN IP or mDNS
# name. If left at the placeholder, the repeater starts in
# deferred-connect mode and you provision the host via the web
# UI's setup wizard or the "pymc_tcp config" panel.
- PYMC_TCP_HOST=${PYMC_TCP_HOST:-192.168.1.50}
- PYMC_TCP_PORT=${PYMC_TCP_PORT:-5055}
- PYMC_TCP_TOKEN=${PYMC_TCP_TOKEN:-} # match the firmware NVS token, empty = open LAN
# ── USB-mode settings (used when RADIO_TYPE=pymc_usb) ──
# Also uncomment the `devices:` block below.
# - SERIAL_PORT=/dev/ttyUSB0
# ── Identity / web UI admin ──
- NODE_NAME=${NODE_NAME:-pyMC_USB_RPT}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin123} # change before exposing the dashboard
# ── Optional radio overrides ──
# - FREQUENCY=869618000
# - TX_POWER=22
# - SPREADING_FACTOR=8
# - BANDWIDTH=62500
# Uncomment only when RADIO_TYPE=pymc_usb and the modem is plugged in:
# devices:
# - /dev/ttyUSB0:/dev/ttyUSB0