Skip to content

Commit 4cc0f51

Browse files
committed
Adapt non-k8s installation to Debian 12
- python venv needed for pip - add missing pvcontrol.service|nginx config files to distro
1 parent a690b09 commit 4cc0f51

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Build distribution
4949
run: |
5050
echo -n ${{ github.sha }} > version
51-
tar --exclude ./pvcontrol/__pycache__ -zcv -f pv-control.tar.gz ./pvcontrol/ ./ui/dist/ui/ requirements.txt *.md LICENSE version
51+
tar --exclude ./pvcontrol/__pycache__ -zcv -f pv-control.tar.gz ./pvcontrol/ ./ui/dist/ui/ requirements.txt *.md LICENSE version pvcontrol.nginx pvcontrol.service
5252
- name: Archive distribution
5353
uses: actions/upload-artifact@v4
5454
with:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ reduced functionality.
7575
Pre-requisites:
7676
- Raspberry Pi 2 with Raspberry Pi OS Lite (Debian 12), or newer model
7777
- [Raspberry Pi Expansion Board, Power Relay](https://www.waveshare.com/rpi-relay-board.htm)
78-
- Python 3.11
78+
- Python 3.11, needs a [venv](https://www.raspberrypi.com/documentation/computers/os.html#python-on-raspberry-pi) on Debias 12 for pip
7979
- download `pv-control.tar.gz` package (release artifacts or from github actions)
8080

8181
The following procedure installs pvcontrol behind an nginx on port 80.
8282

8383
```
84-
sudo apt install python3-pip
84+
python -m venv --system-site-packages ~/.env
85+
source ~/.env/bin/activate
8586
8687
sudo mkdir -p /usr/local/bin/pvcontrol
8788
sudo tar -xzf pv-control.tar.gz -C /usr/local/bin/pvcontrol

pvcontrol.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Description=PV Control
44
[Service]
55
User=pi
66
WorkingDirectory=/usr/local/bin/pvcontrol
7-
ExecStart=python -m pvcontrol --host 127.0.0.1 --basehref /pvcontrol
7+
ExecStart=/home/pi/.env/bin/python -m pvcontrol --host 127.0.0.1 --basehref /pvcontrol
88
Restart=always
99

1010
[Install]

update-pvcontrol.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ else
1414
gh release download "$1" -R stephanme/pv-control --pattern 'pv-control.tar.gz' --output pv-control.tar.gz
1515
fi
1616
mkdir -p pvcontrol && tar -xzf pv-control.tar.gz -C ./pvcontrol
17-
pip install -r pvcontrol/requirements.txt
17+
~/.env/bin/pip install -r pvcontrol/requirements.txt
1818
sudo mv /usr/local/bin/pvcontrol /usr/local/bin/pvcontrol-old
1919
sudo mv ./pvcontrol /usr/local/bin/pvcontrol
2020
sudo systemctl restart pvcontrol.service

0 commit comments

Comments
 (0)