This documentation currently focuses on using Docker for developing and testing the web UI.
Additions, amendments and contributions for additional workflows are most welcome.
The easiest way to launch a new environment is to use Docker Compose.
cd docker
docker compose up
Containers will be built and started for the PiSCSI server and the web UI.
The web UI can be accessed at:
To stop the containers, press Ctrl + C, or run docker compose stop
from another terminal.
The following environment variables are available when using Docker Compose:
Environment Variable | Default |
---|---|
OS_VERSION |
buster |
WEB_HTTP_PORT |
8080 |
WEB_HTTPS_PORT |
8443 |
WEB_LOG_LEVEL |
info |
BACKEND_HOST |
backend |
BACKEND_PORT |
6868 |
BACKEND_PASSWORD |
[None] |
BACKEND_LOG_LEVEL |
debug |
Examples:
Run Debian "bullseye":
OS_VERSION=bullseye docker compose up
Start the web UI with the log level set to debug:
WEB_LOG_LEVEL=debug docker compose up
When using Docker Compose the following volumes will be mounted automatically:
Local Path | Container Path |
---|---|
docker/volumes/images/ | /home/pi/images/ |
docker/volumes/config/ | /home/pi/.config/piscsi/ |
You should rebuild the container images after checking out a different version of
PiSCSI or making changes which affect the environment at build time, e.g.
easyinstall.sh
.
docker compose up --build
Run the following command, replacing [CONTAINER]
with backend
or web
.
docker compose exec [CONTAINER] bash
Use a docker-compose.override.yml
to mount the local python
directory to
/home/pi/piscsi/python/
in the web
container.
Any changes to *.py files on the host computer (i.e. in your IDE) will trigger the web UI process to be restarted in the container.
Example:
services:
web:
volumes:
- ../python:/home/pi/piscsi/python:delegated
This can be useful for testing, but there are some caveats, e.g. the PiSCSI and the
web UI will be accessing separate images
directories.
BACKEND_HOST=foo BACKEND_PASSWORD=bar docker compose up