mirror of
https://github.com/rightup/pyMC_Repeater.git
synced 2026-03-28 17:43:06 +01:00
Merge pull request #119 from migillett/feature/updated-docker-readme
feat: updated readme plus docker usb support
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -62,3 +62,6 @@ data/
|
||||
*.log
|
||||
.DS_Store
|
||||
syncpi.sh
|
||||
|
||||
# Docker
|
||||
/data
|
||||
|
||||
27
README.md
27
README.md
@@ -320,17 +320,34 @@ This script will:
|
||||
The script will prompt you for each optional removal step.
|
||||
|
||||
|
||||
## Docker
|
||||
## Docker Compose
|
||||
|
||||
You can now run PyMC Repeater from within a [Docker Container](https://www.docker.com/). Checkout the example [Docker Compose](./docker-compose.yml) file before you get started.
|
||||
You can now run pyMC Repeater from within a [Docker Container](https://www.docker.com/). Checkout the example [Docker Compose](./docker-compose.yml) file before you get started. It will need some configuration changes based on what hardware you're using (USB vs SPI). Look at the commented out lines to see which hardware requires what lines and only enable what you need.
|
||||
|
||||
Here is what you'll need to do in order to get the container running:
|
||||
|
||||
1. Copy the `config.yaml.example` to `config.yaml`
|
||||
|
||||
```bash
|
||||
cp ./config.yaml.example ./config.yaml
|
||||
```
|
||||
|
||||
2. Run the configuration script and follow the prompts.
|
||||
|
||||
```bash
|
||||
sudo bash ./setup-radio-config.sh
|
||||
```
|
||||
|
||||
3. Modify the `config.yaml` file with a unique web UI password. This allows you to bypass the `/setup` page when logging for the first time. You can find the value under `repeater.security.admin_password`. Change to _anything_ besides the default of `admin123`.
|
||||
|
||||
4. Configure the [docker compose](./docker-compose.yml) to your specific hardware and file paths. Be sure to comment-out or delete lines that aren't required for your hardware. Please note that your hardware devices might be at a different path than those listed in the docker compose file.
|
||||
|
||||
5. Build and start the container.
|
||||
|
||||
```bash
|
||||
docker compose up -d --force-recreate --build
|
||||
```
|
||||
|
||||
Just note that you will have to pass in a `config.yaml` into the container. You can create a new config by following the instructions in the [Configuration section](#configuration).
|
||||
|
||||
|
||||
## Roadmap / Planned Features
|
||||
|
||||
- [ ] **Public Map Integration** - Submit repeater location and details to public map for discovery
|
||||
|
||||
@@ -6,10 +6,17 @@ services:
|
||||
ports:
|
||||
- 8000:8000
|
||||
devices:
|
||||
# SPI DEVICES (Your path may differ)
|
||||
- /dev/spidev0.0
|
||||
- /dev/gpiochip0
|
||||
# USB DEVICES (Your path may differ)
|
||||
- /dev/bus/usb/002:/dev/bus/usb/002
|
||||
# SPI DEVICES PERMISSIONS
|
||||
cap_add:
|
||||
- SYS_RAWIO
|
||||
# USB DEVICSE PERMISSIONS
|
||||
group_add:
|
||||
- plugdev
|
||||
volumes:
|
||||
- ./config.yaml:/etc/pymc_repeater/config.yaml
|
||||
- ./data:/var/lib/pymc_repeater
|
||||
|
||||
@@ -12,6 +12,7 @@ RUN apt-get update && apt-get install -y \
|
||||
python3-rrdtool \
|
||||
jq \
|
||||
wget \
|
||||
libusb-1.0-0 \
|
||||
swig \
|
||||
git \
|
||||
build-essential \
|
||||
@@ -26,6 +27,8 @@ WORKDIR ${INSTALL_DIR}
|
||||
# Copy source
|
||||
COPY repeater ./repeater
|
||||
COPY pyproject.toml .
|
||||
COPY radio-presets.json .
|
||||
COPY radio-settings.json .
|
||||
|
||||
# Install package
|
||||
RUN pip install --no-cache-dir .
|
||||
|
||||
Reference in New Issue
Block a user