Docker aio-base: Using external database

Hi everyone:

My goal is to share the same PostgreSQL server for 3 different deployments of the Axelor ERP.

I’ve been trying to use containers based on aio-base. For those I have modified the “docker-entrypoint.sh” script to generate my desired database connection configuration on the “app.properties” file located at “/var/lib/tomcat/”. This is to solve the issue noted at: https://github.com/axelor/axelor-docker/issues/6

I’ve done that so the db configuration is ready at the first run of the Docker image hoping it performs the database initialisation or whatever it needs on the DB Server. I’m aware that the database server requires superuser permissions for the creation of the user and the database (and each deployment has a different owned database), so I think I’ve managed to take care of that on the script. Actually I’m able to see on the database server the creation of the user and the database. But I’m not able to find the expected tables on that database that I guess should be part of the initialisation.

The Tomcat logs report an error stating that the Postgres server rejected the connection following the inspection of the .WAR file.

Besides the "physical"confirmation of the creation on the server of the user and the database, if I try a connection with the superuser and the “app user” using psql from its shell, I’m able to achieve it in the very same session that complains of the connection rejection.

I haven’t able to get further on this issue. I have no knowledge on Java and I’m not sure if there is something hard coded on the application regarding the connection (the user/password maybe?) because the log that complains mentions the correct server name.

I would appreciate any pointers about this. If the application is not intended to use an external database service, I would like to get a confirmation on this.

Thank you!

its not hard coded, but if you see docker file, it make it available from app.properties which override the applicaiton.properties you need to change it,

otherwise simple method is use tomcat and copy the war there and that’t it, easy method,

let me know if you need more on it

1 « J'aime »

Thank you for responding @siddique
Sadly I gave up on this quite long ago. But appreciate you have taken the time to respond.
Regards!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.