This template provides a boilerplate repository for developing browser-based dashboards based on [\compose](https://github.com/afdaniele/compose).
Use the fork button in the top-right corner of the github page to fork this template repository.
Create a new repository on github.com while specifying the newly forked template repository as a template for your new repository.
List the dependencies in the files dependencies-apt.txt and
dependencies-py3.txt (apt packages and pip packages respectively).
List duckietown Python dependencies in the file dependencies-py3.dt.txt.
List \compose\ packages to install in the file dependencies-compose.txt.
Use the traditional dts devel tools to build and run this project. Replace [ROBOT_NAME] with the name of your Duckiebot:
dts devel build -H [ROBOT_NAME]dts devel run -H [ROBOT_NAME] --rm -- -e HTTP_PORT=8080 -v /data/ramdisk/dtps:/dtps -v /secrets:/secretsYou can also build and run the dashboard locally for development purposes.
dts devel buildcd sandbox && make runThis will start the dashboard and bind it to a Unix domain socket /run/php/php7.4-fpm.sock. Then it will also start nginx and bind it to port 80 inside the container. Port 80 is mapped to port 8888 on the host machine, so you can access the dashboard by navigating to http://localhost:8888 in your web browser.
To use local versions of \compose\ packages instead of the ones installed via the dependencies-compose.txt file, you can mount the local directories as volumes when running the container. For example, if you have a local copy of the duckietown_duckiedrone package, you can run:
cd sandbox &&
make run EXTRA_ARGS='-v "${HOME}/Duckietown/ente/compose/compose-pkg-duckietown-duckiedrone:/user-data/packages/duckietown_duckiedrone:rw"'This will mount the local duckietown_duckiedrone package into the container (you will need to specify the correct path, in the example above it is ${HOME}/Duckietown/ente/compose/compose-pkg-duckietown-duckiedrone), allowing you to use your local changes without having to push to the remote repository.
Note that the package must have been already installed once via the dependencies-compose.txt file, as the package manager will not perform installation automatically when mounting local directories.