-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Matej Troják edited this page Mar 2, 2022
·
1 revision
DeviceControl runs in a Docker container with locally installed database.
The reason for installation of database locally is to make data more persistent and prone to unintentional deletion.
-
Before we start, it is necessary to install
mySQLdatabase anddocker:sudo scripts/install_dependencies.sh -
Then we need to set up the database:
sudo scripts/setup_database.sh "<username>" "<password>" -
Set environment variable to DATABASE to your local IP address - this is used by
dockerto access the databaseDATABASE=$(/sbin/ifconfig <interface> | sed -En -e 's/.*inet ([0-9.]+).*/\1/p') -
Enable connections to your
mySQLdatabase from outside oflocalhost(might even require opening firewall for port 3306) -
Download docker and start the
docker:docker run -d --privileged -v /dev/serial/by-port/:/dev/serial/by-port/ -p 0.0.0.0:5000:5000 --restart unless-stopped --add-host="database:$DATABASE" --env-file DB_CONFIG --name "devicecontrol" bioarineo/devicecontrol:latest-<platform>where
<platform>is eitheramdorarm. Theby-portis mapped todockerfile system to access devices connected to I/O ports.
DeviceControl is running and ready to be used.