When using docker, is there any config file specified (can’t seem to find any)? If so, what config is used and how do you edit it? If no, how can you use a config file?
The configuration files were introduced recently (as in last week). Before all the configuration was set using environment variables, which still works in the new situation in a backwards compatible way. You can still use this (e.g. see https://docs.loraserver.io/install/docker/), but I recommend you to start using configuration files. This example will be updated soon
By default these are loaded from /etc/loraserver/loraserver.toml (in case of LoRa Server), so in order to make this work with Docker, you need to create a volume where you expose a local folder as volume to /etc/loraserver. I believe what you need is the -v flag: -v /host/directory/loraserver:/etc/loraserver. Then your would have your configuration in /host/directory/loraserver/loraserver.toml.
Thank you. I was thinking about when adding a network server via the GUI. Is the default port 8000? Aka you should specify the [network_server.api] ip/port from the lora server (loraserver instead of localhost when using docker) in the GUI when adding a new network server?
Short answer: Scroll a bit down on the Docker page
Longer answer: when LoRa Server is binding to 0.0.0.0:8000 the 0.0.0.0 means it is binding to all interfaces on port 8000. What you need to enter in the web-interface depends how the two containers are linked. In the docker-compose.yml example you need to use loraserver:8000 as the LoRa Server services is resolvable by the hostname loraserver.
Sorry, I was not clear. That was why I asked if port 8000 is default (because it’s used on the docker page without any specifications in the docker-compose that the lora server is running at 8000). But if I understand you that is correct.
This might be a question more related to docker (and might require me to create another thread). But if I run:
docker-compose run --rm loraserver bash
It should spawn a shell in the latest build (what I understand it’s a multi-stage build)?
FROM alpine:latest AS production
WORKDIR /root/
RUN apk --no-cache add ca-certificates tzdata
COPY --from=development /go/src/github.com/brocaar/loraserver/build/loraserver .
ENTRYPOINT ["./loraserver"]
So I should have an executable in /root/ with name loraserver? My guess is I’m missing a bunch. What should be the next step after running docker-compose run --rm loraserver bash? Or is it that simple that I just need to compile it via make command (if so, is the docker file not executed?)?
Please let not mix two questions in one topic I think I answered your question with regards to configuration There are other topics to discuss compilation: https://forum.loraserver.io/search?q=compiling.
we need to install loraserver for production using docker which version we are using for production and what configuration we need to change for production usages
The loraserver-docker repo is a good starting point for building your own configuration for use in production. The actual configuration will vary greatly depending on your delpoyment details and use case.
I added the -env docker-compose file, which was used as the (very simple) basis for our LoRa Server deployment on Kubernetes.