Details
-
Type: extRequest
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:None
-
Sender Email:
-
HD-Chapter:Apps
-
HD-Enabler:Marketplace
Description
Hi, my project is FerTility. I succesfully installed WMarket using
Docker but i have a big problem with database of WMarket. The problem is
that i want to change the password of Root for security reasons.When i
changed i can login in database but i can not login in WMarket and i can
not create any user.In other side, with the default password there is
not any problem at all.Can you help me so i can fix it?
[Created via e-mail received from: nikos kapetanakis <nkapetanakis@upcom.eu>]
Hi,
If you want to customize the credentials to access the database you cannot use the default image, as it has these details fixed. The best option is to create your own image. To do so, you can take as base the WMarket Dockerfile (https://github.com/conwetlab/WMarket/blob/master/docker/Dockerfile) and modify this line:
RUN sed -i "s|^jdbc.password=.*$|jdbc.password=my-secret-pw|" WMarket/WEB-INF/classes/properties/database.properties
by this one:
RUN sed -i "s|^jdbc.password=.*$|jdbc.password=YOUR_PASSWORD|" WMarket/WEB-INF/classes/properties/database.properties
Where YOUR_PASSWORD is the new password for the root user.
Additionally, if you don't want to use the root user, you have to add this line to the WMarket Docker file (in the line 24):
RUN sed -i "s|^jdbc.username=.*$|jdbc.username=NEW_USER|" WMarket/WEB-INF/classes/properties/database.properties
Where NEW_USER is the new user you have created to access the database from WMarket.
I do not know if you have more doubts. If so, please, do not hesitate to contact me.
Please, take into account that you ticket will be closed within three (3) days if we do not receive any feedback from you in that period.
BR
Aitor.