Installation & Setup
This repository can be
installed as a system service on Linux-based systems or
deployed using Docker on Linux-based systems.
Manual Install
PyPI
To install the latest released version of the package you can use the command:
pip install icoapi
Afterwards you should be able to run the web API using the following command:
icoapi
Repository
If you want to use the latest version of ICOapi (e.g. for development) then we recommend that you install:
After that please just use the command:
just run
to setup and start the web API.
System Service Installation (Linux)
For Linux, there is an installation script which sets the directory for the actual installation, the directory for the systemd service and the used systemd service name. The (sensible) defaults are:
SERVICE_NAME="icoapi"
INSTALL_DIR="/etc/icoapi"
SERVICE_PATH="/etc/systemd/system"
To install the service use the command:
./install.sh
If you want to delete existing installations and do a clean reinstall, add the --force flag:
./install.sh --force
Docker (Linux)
You can use our Dockerfile to build a Docker image for the API:
docker build -t icoapi .
To run a container based on the image you can use the following command:
docker run --network=host icoapi
Note: The option --network=host is required to give the container access to the CAN adapter. As far as we know using the CAN adapter this way only works on a Linux host. For other more secure options to map the CAN adapter into the container, please take a look at:
the article “SocketCAN mit Docker unter Linux”.