Hi Yannick,
I’m not sure if it should work by starting npm in ui folder. When you do make clean / make build you should have an appserver executable in build folder. That executable includes webserver with ui.
So it could work. Idk, I did not try, or maybe I did but it didn’t work, so I skipped that as I did not really need a debug environment for minor changes I was doing. It would be better though. But first you should make sure you can build and run it in basic setup without changes.
I see the executable. How would I start it?
Well, that would depend on your operating system. The default binary is linux-amd64 I believe.
As I was on ubuntu I simply installed all chirpstack components and requirements on the system directly and used docker image only for app server source code build. Then I just swapped original binary for my built binary to run it with my configuration.
But basic way to build and run chirpstack components is using docker images I think.
thanks. Yes but we would not want to build and run all components if we want only to change things on the application server?
Like add a button etc. in a development environment.
Could not get this to run yet.
Then build just the application server. It seems to me thet you may be miissing the fact that application server web UI is part of application server binary (executable). Therefore, if you want to make changes in web UI then you have to build application server binary.
For other components you can just use pre-built binaries or docker images.
Ok, so if I do understand correctly, this won’t work using docker build container.
So far this works for me only if I sudo apt install npm on host machine so that I can run it on host too, not inside container. That way it works as @brocaar and @iegomez mentioned.
You can follow that approach even within containers. However, you will have to do some additional configurations to get everything up and running.
My suggestion in this case would be try to install and deploy from local and after a while, then move to the container approach, at that time you will be more familiar and the transition would be way easier.
However, you will have to do some additional configurations to get everything up and running.
I’m interested what kind of config that would be because using docker container as build environment actually seems somehow easier and safer to me as it is pre-configured, so that I don’t really have to care about what packages of what versions to install.
First thing I’m thinking of is whether the ECONNREFUSED error is because of docker config rather than node.js config… ?
That message appears probably because of the following:
missing ChirpStack Application Server binary running
even though when you have ChirpStack Application Server binary running, it may happen that you have not connected to the postgres database, hence the development server can not access the API at 8080/api.
You need to be sure that you are running the same container for both the binary and the development server. From the steps provided here, it looks to me that there are two different containers (one executing npm start, the other ChirpStack Application Server binary) that are not communicating each other. Aside of this, you need to make sure that the container that runs ChirpStack Application Server is able to reach the postgres database.