How to start the web interface for Device Profiles locally without Docker?

Viewed 111

Hello,
I've been following the instructions to add new device profiles to this repository :
https://github.com/chirpstack/chirpstack-device-profiles/ (ChirpStack device-profiles),
and on the latest build, the README.md file states :

  • Please make sure that you have Docker Compose installed.
  • In the root of this repository, execute make serve.
  • Once Starting server, bind: 0.0.0.0:8090 appears, open the web-interface in your browser by navigating to http://localhost:8090.

However when looking at the Dockerfile at the root of the repo, there's a comment saying that it removes the need to build the interface in local, implying that maybe there is, or there used to be a way to have it work without Docker installed.

I tried making some modifications on my own to the several Makefiles and config files but I'm not too familiar with how Docker works and I can't manage to make it run.

Please anyone knows how to make it work if possible, and if not, can explain why Docker is absolutely necessary? Also, if we can't get rid of Docker, can we at least change the hosting port from 8090 to something else?

1 Answers

Without Docker, you will need to setup an environment that is able to build the React / Typescript UI front-end + the Rust backend-code.

In summary, the build steps performend in the workflow to build the Docker image are:

If this is only about changing port 8090 to an other port, then just modifying the command that starts Docker is an easier approach: https://github.com/chirpstack/chirpstack-device-profiles/blob/master/Makefile#L5

E.g. change 8090:8090 to 9000:8090 to expose the UI on port 9000.

Hi, I'm coming back to this 2 months later. (Maybe I should open another post, please tell me)

I managed to make it work thank to those indications using the Nix environment but I wonder if it is possible to use a package manager other than Nix such as APT on Ubuntu and have the same results.

As you said I would need to be able to build the front-end and run the back-end code using the packages present in the Nix environment but would it work with APT if I manage to have a similar environment and then run the make commands or is there more to this?

You should be able to do so, the only thing the shell.nix does for you is install dependencies + set the correct PATH. You can do the same with any other package manager. I'm using Nix because it is convenient and easy to reproduce.