Any way to change database url?

Good afternoon everyone!

First time poster in the community, however I have been lurking for quite a while. First, to get some general information out of the way, this question revolves around a local blynk server instance deployed from the Blynk Docker image.

I am trying to enable raw data storage using a postgresql database as per the instructions in the github page, however I want to change the default DB url which is set to jdbc:postgresql://localhost:5432/blynk?tcpKeepAlive=true&socketTimeout=150 for the blynk database and jdbc:postgresql://localhost:5432/blynk_reporting?tcpKeepAlive=true&socketTimeout=150 for the reporting database.

All is well and good if you deploy the database on the same host as your local blynk server, however, if you have a networked database (my case), this won’t do. I know that there is a db.properties file located here which looks promising enough, however I can’t find this file within the Blynk Docker container. My guess is that this configuration file is just used during the building of the code artifacts and not actually stored within the container, although this also doesn’t make a lot of sense given that server.properties is present within the container at /config/server.properties.

I thought maybe by overriding the jdbc.url and reporting.jdbc.url variables in the server.properties file and restarting the container the changes would take effect, but it seems this is not the case as Blynk is still attempting a connection to localhost:5432.

TL;DR: Is there any way to modify the DB URL in the Dockerized version of Blynk? I want to avoid having to build the solution from the source code.

Hello. In general all you need is to change db.properties file in the regular server install. Current docker settings doesn’t have that.

I see. Thank you for confirming Dmitriy, and thank you for all the effort that has gone into the software!

By any chance, is this functionality planned to be added to the Docker version? I’m assuming it wouldn’t take too much work given that the functionality already exists for the server.properties file the Docker container. Anyways, just speculating and not trying to add to your backlog, although it would make things a bit more extensible :slight_smile:. For instance, it would allow the Blynk Docker image to integrate with Docker Networks and store data across different containers. I think that would be really cool.

Anyways, thank you for the information!