The feature branch feature/oba-2x has three data-sources.xml files that need to have their database credentials parameterized and loaded from the environment variables injected from the docker-compose.yml file.
Here are the particulars:
1. Parameterize DB configuration in data-sources.xml
Locate all DB credential/url/driver declarations in the three data-sources.xml files (e.g. see lines 22-25 here) and replace the hardcoded values with substitutable placeholders. For instance, update:
The parameter names JDBC_DRIVER, JDBC_URL, JDBC_USERNAME, and JDBC_PASSWORD all come from the docker-compose.yml file, and the values are currently matched up between the configuration for the MySQL server and OBA app server in the docker-compose.yml file.
Perform substitution at container launch
Add a new shell script to the OBA Docker image that will supplement the existing Tomcat image's CMD. This new CMD shell script will do a find and replace with sed or another similar tool of the placeholders in the three data-sources.xml files.
The feature branch
feature/oba-2x
has threedata-sources.xml
files that need to have their database credentials parameterized and loaded from the environment variables injected from thedocker-compose.yml
file.Here are the particulars:
1. Parameterize DB configuration in data-sources.xml
Locate all DB credential/url/driver declarations in the three
data-sources.xml
files (e.g. see lines 22-25 here) and replace the hardcoded values with substitutable placeholders. For instance, update:to:
The parameter names
JDBC_DRIVER
,JDBC_URL
,JDBC_USERNAME
, andJDBC_PASSWORD
all come from thedocker-compose.yml
file, and the values are currently matched up between the configuration for the MySQL server and OBA app server in thedocker-compose.yml
file.Perform substitution at container launch
Add a new shell script to the OBA Docker image that will supplement the existing Tomcat image's
CMD
. This newCMD
shell script will do a find and replace withsed
or another similar tool of the placeholders in the threedata-sources.xml
files.