Repository navigation
Docker and Deployment
docker build -t peykan .
docker run -d --name peykan -p 6278:6278 peykanThen use http://localhost:6278/sse and http://localhost:6278/dashboard as usual.
The image (Dockerfile, Ubuntu 22.04, Python 3.10) installs the pinned requirements.txt and the package, runs as a non-root user, and starts peykan demo --port 6278, so the simulator and server share one process and one virtual bus. It sets PEYKAN_MCP_HOST=0.0.0.0 so the port mapping works (the server otherwise listens on loopback only). A health check calls /healthz every 30 s.
cd docker
docker compose up -d --buildOne peykan service running demo. The simulator and server must stay in one container: separate containers can't share the virtual bus.
Run peykan server instead of demo, and give the container access to the adapter: for SocketCAN that means host networking (--network host) with the can0 link configured on the host; for USB adapters, pass the device through. Set PEYKAN_CAN_INTERFACE / PEYKAN_CAN_CHANNEL and the transmit settings from Real Hardware and Safety.
0.0.0.0 makes the tools reachable by anyone who can reach the port, with no authentication. Inside Docker on your own machine that's fine; on a shared network, keep it behind a firewall or an authenticating reverse proxy.
The package is published as peykan by .github/workflows/release.yml when a v*.*.* tag is pushed. The workflow refuses to publish if the tag doesn't match __version__ in src/peykan/__init__.py.
Release steps:
- Set
__version__insrc/peykan/__init__.py, and move the changelog's "Unreleased" notes under a heading for the new version. - Commit and push.
- Tag that commit and push the tag:
git tag v0.2.1 git push origin v0.2.1
PyPI can take a few minutes to list a new version; pip install --no-cache-dir peykan==0.2.1 fetches it directly.
The workflow currently authenticates with a PYPI_API_TOKEN secret. PyPI's trusted publishing (no stored token) is an optional upgrade.
Getting started
Reference
Protocols
Features
Operating it
Contributing