diff --git a/common/DO_NOT_REMOVE_DRIVERS_FOLDER.txt b/common/DO_NOT_REMOVE_DRIVERS_FOLDER.txt new file mode 100644 index 00000000..51e6d0eb --- /dev/null +++ b/common/DO_NOT_REMOVE_DRIVERS_FOLDER.txt @@ -0,0 +1 @@ +The `drivers` folder is used to add additional drivers. These drivers will be copied to the `/config/resources` folder of the ODM Docker images at build time. \ No newline at end of file diff --git a/common/drivers/.gitignore b/common/drivers/.gitignore new file mode 100644 index 00000000..86d0cb27 --- /dev/null +++ b/common/drivers/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file diff --git a/common/script/installDerby.sh b/common/script/installDerby.sh index 415addb8..cb1dd192 100755 --- a/common/script/installDerby.sh +++ b/common/script/installDerby.sh @@ -1,5 +1,6 @@ #!/bin/bash # Install the driver for Derby +echo "Install the driver for Derby" wget -nv http://central.maven.org/maven2/org/apache/derby/derbyclient/10.12.1.1/derbyclient-10.12.1.1.jar mv derby* /config/resources diff --git a/common/script/installMySQL.sh b/common/script/installMySQL.sh index 98e2c215..a9e60056 100755 --- a/common/script/installMySQL.sh +++ b/common/script/installMySQL.sh @@ -1,5 +1,6 @@ #!/bin/bash # Install the driver for MySQL +echo "Install the driver for MySQL" wget -nv http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.22/mysql-connector-java-5.1.22.jar mv mysql* /config/resources diff --git a/common/script/installPostgres.sh b/common/script/installPostgres.sh index 1850ac2e..5eb94f77 100755 --- a/common/script/installPostgres.sh +++ b/common/script/installPostgres.sh @@ -1,5 +1,6 @@ #!/bin/bash # Install the driver for PostgreSQL -wget -nv https://jdbc.postgresql.org/download/postgresql-9.3-1104.jdbc4.jar +echo "Install the driver for postgreSQL" +wget -nv https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar mv postgres* /config/resources diff --git a/databases/derby/Dockerfile b/databases/derby/Dockerfile index eaa02b84..b02bc5c0 100755 --- a/databases/derby/Dockerfile +++ b/databases/derby/Dockerfile @@ -8,7 +8,7 @@ MAINTAINER ODMDev odmdev_open_source_user@wwpdl.vnet.ibm.com, Laurent GRATEAU + + + + + + + + + + + + diff --git a/decisioncenter/config/datasource-derby.xml b/decisioncenter/config/datasource-derby.xml index 85ed6f89..eae1b445 100644 --- a/decisioncenter/config/datasource-derby.xml +++ b/decisioncenter/config/datasource-derby.xml @@ -16,11 +16,11 @@ minPoolSize="10" connectionTimout="10s" agedTimeout="30m"/> - + user="odmusr" + password="odmpwd" /> diff --git a/decisioncenter/config/datasource-mysql.xml b/decisioncenter/config/datasource-mysql.xml index cff55368..348e4626 100644 --- a/decisioncenter/config/datasource-mysql.xml +++ b/decisioncenter/config/datasource-mysql.xml @@ -4,20 +4,26 @@ - + + + jdbcDriverRef="MySQLDriver" + type="javax.sql.ConnectionPoolDataSource"> diff --git a/decisioncenter/config/datasource-postgres.xml b/decisioncenter/config/datasource-postgres.xml index f7bc3024..58660af2 100644 --- a/decisioncenter/config/datasource-postgres.xml +++ b/decisioncenter/config/datasource-postgres.xml @@ -22,15 +22,16 @@ --> diff --git a/decisioncenter/script/rundc.sh b/decisioncenter/script/rundc.sh index f83b9d0c..69b5c6ef 100755 --- a/decisioncenter/script/rundc.sh +++ b/decisioncenter/script/rundc.sh @@ -10,9 +10,11 @@ fi if [ -n "$DC_PERSISTENCE_LOCALE" ] then - sed -i 's|DC_PERSISTENCE_LOCALE|'$DC_PERSISTENCE_LOCALE'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties + echo "use DC_PERSISTENCE_LOCALE set to $DC_PERSISTENCE_LOCALE" + sed -i 's|DC_PERSISTENCE_LOCALE|'$DC_PERSISTENCE_LOCALE'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties else - sed -i 's|DC_PERSISTENCE_LOCALE|'en_US'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties + echo "no DC_PERSISTENCE_LOCALE set use default en_US" + sed -i 's|DC_PERSISTENCE_LOCALE|'en_US'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties fi # Begin - Configuration for the user registry @@ -34,29 +36,39 @@ then echo "Use DB_DRIVER_URL: $DB_DRIVER_URL" wget -nv $DB_DRIVER_URL case $DB_DRIVER_URL in - *derby* ) mv derby* /config/resources + *derby* ) rm /config/resources/derby* + mv derby* /config/resources cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) mv mysql* /config/resources + *mysql* ) rm /config/resources/mysql* + mv mysql* /config/resources cp /config/datasource-mysql.xml /config/datasource.xml ;; *postgres* ) rm /config/resources/postgres* mv postgres* /config/resources cp /config/datasource-postgres.xml /config/datasource.xml ;; + *db2* ) rm /config/resources/db2* + mv db2* /config/resources + cp /config/datasource-db2.xml /config/datasource.xml + ;; esac elif [ -n "$DB_TYPE" ] then echo "Use DB_TYPE: $DB_TYPE" case $DB_TYPE in - *derby* ) /script/installDerby.sh + *derby* ) if [ ! -f /config/resources/derby* ]; then /script/installDerby.sh; fi cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) /script/installMySQL.sh + *mysql* ) if [ ! -f /config/resources/mysql* ]; then /script/installMySQL.sh; fi cp /config/datasource-mysql.xml /config/datasource.xml ;; + # For postgreSQL, we do not have to install the driver here since it is installed by default at build time *postgres* ) cp /config/datasource-postgres.xml /config/datasource.xml - ;; + ;; + # For DB2, we do not have to install the driver here since it is supposed to be provided through the drivers folder at build time + *db2* ) cp /config/datasource-db2.xml /config/datasource.xml + ;; esac else echo "Use PostgreSQL as database by default" @@ -64,6 +76,29 @@ else fi # End - Configuration for the database +# Begin - Change values for the datasource if required +if [ -n "$DB_SERVER_NAME" ] +then + sed -i 's|dbserver|'$DB_SERVER_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_PORT_NUMBER" ] +then + sed -i 's|5432|'$DB_PORT_NUMBER'|g' /config/datasource.xml +fi +if [ -n "$DB_NAME" ] +then + sed -i 's|odmdb|'$DB_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_USER" ] +then + sed -i 's|odmusr|'$DB_USER'|g' /config/datasource.xml +fi +if [ -n "$DB_PASSWORD" ] +then + sed -i 's|odmpwd|'$DB_PASSWORD'|g' /config/datasource.xml +fi +# End - Change values for the datasource if required + # Begin - Add DC Rest Api Web App if [ -e /config/apps/decisioncenter-api.war ] then @@ -74,9 +109,4 @@ else fi # End - Add DC Rest Api Web App -if [ -n "$DBSERVER_NAME" ] -then - sed -i 's|dbserver|'$DBSERVER_NAME'|g' /config/datasource.xml -fi - /opt/ibm/docker/docker-server run defaultServer diff --git a/decisionserver/config/datasource-db2.xml b/decisionserver/config/datasource-db2.xml new file mode 100644 index 00000000..320b195e --- /dev/null +++ b/decisionserver/config/datasource-db2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/decisionserver/config/datasource-derby.xml b/decisionserver/config/datasource-derby.xml index 365bf3a1..3bdbe8a1 100644 --- a/decisionserver/config/datasource-derby.xml +++ b/decisionserver/config/datasource-derby.xml @@ -5,7 +5,7 @@ - + diff --git a/decisionserver/config/datasource-mysql.xml b/decisionserver/config/datasource-mysql.xml index 8c45e539..cf9189fc 100644 --- a/decisionserver/config/datasource-mysql.xml +++ b/decisionserver/config/datasource-mysql.xml @@ -4,9 +4,14 @@ - - - + + + + diff --git a/decisionserver/config/datasource-postgres.xml b/decisionserver/config/datasource-postgres.xml index ad76c100..2c554f41 100644 --- a/decisionserver/config/datasource-postgres.xml +++ b/decisionserver/config/datasource-postgres.xml @@ -12,15 +12,15 @@ --> diff --git a/decisionserver/decisionrunner/Dockerfile b/decisionserver/decisionrunner/Dockerfile index 74a121b8..2bfc6938 100755 --- a/decisionserver/decisionrunner/Dockerfile +++ b/decisionserver/decisionrunner/Dockerfile @@ -20,12 +20,13 @@ COPY $ODMDOCKERDIR/decisionserver/decisionrunner/config /config COPY $ODMDOCKERDIR/decisionserver/decisionrunner/script $SCRIPT COPY $ODMDOCKERDIR/common/security /config/resources/security COPY $ODMDOCKERDIR/common/script $SCRIPT +COPY $ODMDOCKERDIR/common/drivers /config/resources COPY ./executionserver/applicationservers/WLP855/DecisionRunner.war /config/apps/ RUN chmod -R a+x $SCRIPT && \ sync && \ - $SCRIPT/installPostgres.sh && \ + if [ ! -f /config/resources/postgres* ]; then $SCRIPT/installPostgres.sh; fi && \ cd /config/apps/extract && \ unzip -q ../DecisionRunner.war && \ cd ../ && \ diff --git a/decisionserver/decisionrunner/script/rundr.sh b/decisionserver/decisionrunner/script/rundr.sh index ed8974c4..a6f84d59 100755 --- a/decisionserver/decisionrunner/script/rundr.sh +++ b/decisionserver/decisionrunner/script/rundr.sh @@ -33,29 +33,39 @@ then echo "Use DB_DRIVER_URL: $DB_DRIVER_URL" wget -nv $DB_DRIVER_URL case $DB_DRIVER_URL in - *derby* ) mv derby* /config/resources + *derby* ) rm /config/resources/derby* + mv derby* /config/resources cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) mv mysql* /config/resources + *mysql* ) rm /config/resources/mysql* + mv mysql* /config/resources cp /config/datasource-mysql.xml /config/datasource.xml ;; *postgres* ) rm /config/resources/postgres* mv postgres* /config/resources cp /config/datasource-postgres.xml /config/datasource.xml ;; + *db2* ) rm /config/resources/db2* + mv db2* /config/resources + cp /config/datasource-db2.xml /config/datasource.xml + ;; esac elif [ -n "$DB_TYPE" ] then echo "Use DB_TYPE: $DB_TYPE" case $DB_TYPE in - *derby* ) /script/installDerby.sh + *derby* ) if [ ! -f /config/resources/derby* ]; then /script/installDerby.sh; fi cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) /script/installMySQL.sh + *mysql* ) if [ ! -f /config/resources/mysql* ]; then /script/installMySQL.sh; fi cp /config/datasource-mysql.xml /config/datasource.xml ;; + # For postgreSQL, we do not have to install the driver here since it is installed by default at build time *postgres* ) cp /config/datasource-postgres.xml /config/datasource.xml - ;; + ;; + # For DB2, we do not have to install the driver here since it is supposed to be provided through the drivers folder at build time + *db2* ) cp /config/datasource-db2.xml /config/datasource.xml + ;; esac else echo "Use PostgreSQL as database by default" @@ -63,9 +73,27 @@ else fi # End - Configuration for the database -if [ -n "$DBSERVER_NAME" ] +# Begin - Change values for the datasource if required +if [ -n "$DB_SERVER_NAME" ] +then + sed -i 's|dbserver|'$DB_SERVER_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_PORT_NUMBER" ] +then + sed -i 's|5432|'$DB_PORT_NUMBER'|g' /config/datasource.xml +fi +if [ -n "$DB_NAME" ] +then + sed -i 's|odmdb|'$DB_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_USER" ] +then + sed -i 's|odmusr|'$DB_USER'|g' /config/datasource.xml +fi +if [ -n "$DB_PASSWORD" ] then - sed -i 's|dbserver|'$DBSERVER_NAME'|g' /config/datasource.xml + sed -i 's|odmpwd|'$DB_PASSWORD'|g' /config/datasource.xml fi +# End - Change values for the datasource if required /opt/ibm/docker/docker-server run defaultServer diff --git a/decisionserver/decisionserverconsole/Dockerfile b/decisionserver/decisionserverconsole/Dockerfile index f2c8c10f..5b2110de 100755 --- a/decisionserver/decisionserverconsole/Dockerfile +++ b/decisionserver/decisionserverconsole/Dockerfile @@ -13,19 +13,20 @@ ENV SCRIPT /script RUN mkdir -p $SCRIPT && \ mkdir -p /config/resources && \ - mkdir -p /config/apps/extract + mkdir -p /config/apps/extract COPY $ODMDOCKERDIR/decisionserver/config /config COPY $ODMDOCKERDIR/decisionserver/decisionserverconsole/config /config COPY $ODMDOCKERDIR/decisionserver/decisionserverconsole/script $SCRIPT COPY $ODMDOCKERDIR/common/security /config/resources/security COPY $ODMDOCKERDIR/common/script $SCRIPT +COPY $ODMDOCKERDIR/common/drivers /config/resources COPY ./executionserver/applicationservers/WLP855/res.war /config/apps/ RUN chmod -R a+x $SCRIPT && \ sync && \ - $SCRIPT/installPostgres.sh && \ + if [ ! -f /config/resources/postgres* ]; then $SCRIPT/installPostgres.sh; fi && \ cd /config/apps/extract && \ unzip -q ../res.war && \ cd ../ && \ diff --git a/decisionserver/decisionserverconsole/script/runds.sh b/decisionserver/decisionserverconsole/script/runds.sh index 005434d0..4859ed90 100755 --- a/decisionserver/decisionserverconsole/script/runds.sh +++ b/decisionserver/decisionserverconsole/script/runds.sh @@ -24,29 +24,39 @@ then echo "Use DB_DRIVER_URL: $DB_DRIVER_URL" wget -nv $DB_DRIVER_URL case $DB_DRIVER_URL in - *derby* ) mv derby* /config/resources + *derby* ) rm /config/resources/derby* + mv derby* /config/resources cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) mv mysql* /config/resources + *mysql* ) rm /config/resources/mysql* + mv mysql* /config/resources cp /config/datasource-mysql.xml /config/datasource.xml ;; *postgres* ) rm /config/resources/postgres* mv postgres* /config/resources cp /config/datasource-postgres.xml /config/datasource.xml ;; + *db2* ) rm /config/resources/db2* + mv db2* /config/resources + cp /config/datasource-db2.xml /config/datasource.xml + ;; esac elif [ -n "$DB_TYPE" ] then echo "Use DB_TYPE: $DB_TYPE" case $DB_TYPE in - *derby* ) /script/installDerby.sh + *derby* ) if [ ! -f /config/resources/derby* ]; then /script/installDerby.sh; fi cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) /script/installMySQL.sh + *mysql* ) if [ ! -f /config/resources/mysql* ]; then /script/installMySQL.sh; fi cp /config/datasource-mysql.xml /config/datasource.xml ;; + # For postgreSQL, we do not have to install the driver here since it is installed by default at build time *postgres* ) cp /config/datasource-postgres.xml /config/datasource.xml - ;; + ;; + # For DB2, we do not have to install the driver here since it is supposed to be provided through the drivers folder at build time + *db2* ) cp /config/datasource-db2.xml /config/datasource.xml + ;; esac else echo "Use PostgreSQL as database by default" @@ -54,9 +64,27 @@ else fi # End - Configuration for the database -if [ -n "$DBSERVER_NAME" ] +# Begin - Change values for the datasource if required +if [ -n "$DB_SERVER_NAME" ] +then + sed -i 's|dbserver|'$DB_SERVER_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_PORT_NUMBER" ] +then + sed -i 's|5432|'$DB_PORT_NUMBER'|g' /config/datasource.xml +fi +if [ -n "$DB_NAME" ] +then + sed -i 's|odmdb|'$DB_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_USER" ] +then + sed -i 's|odmusr|'$DB_USER'|g' /config/datasource.xml +fi +if [ -n "$DB_PASSWORD" ] then - sed -i 's|dbserver|'$DBSERVER_NAME'|g' /config/datasource.xml + sed -i 's|odmpwd|'$DB_PASSWORD'|g' /config/datasource.xml fi +# End - Change values for the datasource if required /opt/ibm/docker/docker-server run defaultServer \ No newline at end of file diff --git a/decisionserver/decisionserverruntime/Dockerfile b/decisionserver/decisionserverruntime/Dockerfile index 1148d4a1..3b97ff20 100755 --- a/decisionserver/decisionserverruntime/Dockerfile +++ b/decisionserver/decisionserverruntime/Dockerfile @@ -20,12 +20,13 @@ COPY $ODMDOCKERDIR/decisionserver/decisionserverruntime/config /config COPY $ODMDOCKERDIR/decisionserver/decisionserverruntime/script $SCRIPT COPY $ODMDOCKERDIR/common/security /config/resources/security COPY $ODMDOCKERDIR/common/script $SCRIPT +COPY $ODMDOCKERDIR/common/drivers /config/resources COPY ./executionserver/applicationservers/WLP855/DecisionService.war /config/apps/ RUN chmod -R a+x $SCRIPT && \ sync && \ - $SCRIPT/installPostgres.sh && \ + if [ ! -f /config/resources/postgres* ]; then $SCRIPT/installPostgres.sh; fi && \ cd /config/apps/extract && \ unzip -q ../DecisionService.war && \ cd ../ && \ diff --git a/decisionserver/decisionserverruntime/script/runds.sh b/decisionserver/decisionserverruntime/script/runds.sh index c77e3fef..4c9083d2 100755 --- a/decisionserver/decisionserverruntime/script/runds.sh +++ b/decisionserver/decisionserverruntime/script/runds.sh @@ -39,29 +39,39 @@ then echo "Use DB_DRIVER_URL: $DB_DRIVER_URL" wget -nv $DB_DRIVER_URL case $DB_DRIVER_URL in - *derby* ) mv derby* /config/resources + *derby* ) rm /config/resources/derby* + mv derby* /config/resources cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) mv mysql* /config/resources + *mysql* ) rm /config/resources/mysql* + mv mysql* /config/resources cp /config/datasource-mysql.xml /config/datasource.xml ;; *postgres* ) rm /config/resources/postgres* mv postgres* /config/resources cp /config/datasource-postgres.xml /config/datasource.xml ;; + *db2* ) rm /config/resources/db2* + mv db2* /config/resources + cp /config/datasource-db2.xml /config/datasource.xml + ;; esac elif [ -n "$DB_TYPE" ] then echo "Use DB_TYPE: $DB_TYPE" case $DB_TYPE in - *derby* ) /script/installDerby.sh + *derby* ) if [ ! -f /config/resources/derby* ]; then /script/installDerby.sh; fi cp /config/datasource-derby.xml /config/datasource.xml ;; - *mysql* ) /script/installMySQL.sh + *mysql* ) if [ ! -f /config/resources/mysql* ]; then /script/installMySQL.sh; fi cp /config/datasource-mysql.xml /config/datasource.xml ;; + # For postgreSQL, we do not have to install the driver here since it is installed by default at build time *postgres* ) cp /config/datasource-postgres.xml /config/datasource.xml - ;; + ;; + # For DB2, we do not have to install the driver here since it is supposed to be provided through the drivers folder at build time + *db2* ) cp /config/datasource-db2.xml /config/datasource.xml + ;; esac else echo "Use PostgreSQL as database by default" @@ -69,9 +79,27 @@ else fi # End - Configuration for the database -if [ -n "$DBSERVER_NAME" ] -then - sed -i 's|dbserver|'$DBSERVER_NAME'|g' /config/datasource.xml +# Begin - Change values for the datasource if required +if [ -n "$DB_SERVER_NAME" ] +then + sed -i 's|dbserver|'$DB_SERVER_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_PORT_NUMBER" ] +then + sed -i 's|5432|'$DB_PORT_NUMBER'|g' /config/datasource.xml +fi +if [ -n "$DB_NAME" ] +then + sed -i 's|odmdb|'$DB_NAME'|g' /config/datasource.xml +fi +if [ -n "$DB_USER" ] +then + sed -i 's|odmusr|'$DB_USER'|g' /config/datasource.xml +fi +if [ -n "$DB_PASSWORD" ] +then + sed -i 's|odmpwd|'$DB_PASSWORD'|g' /config/datasource.xml fi +# End - Change values for the datasource if required /opt/ibm/docker/docker-server run defaultServer diff --git a/docker-compose.yml b/docker-compose.yml index a8b59f50..4d5bd05e 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,8 +10,8 @@ services: ports: - 5432:5432 environment: - - POSTGRES_USER=odm - - POSTGRES_PASSWORD=odm + - POSTGRES_USER=odmusr + - POSTGRES_PASSWORD=odmpwd - POSTGRES_DB=odmdb - PGDATA=/pgdata - SAMPLE=true @@ -36,7 +36,7 @@ services: - 9080:9080 - 1883:1883 #environment: - #- DBSERVER_NAME=dbserver + #- DB_SERVER_NAME=dbserver odm-decisionrunner: image: $REPOSITORY/$PREFIXIMAGE-decisionrunner:$ODMVERSION diff --git a/odm-cluster.yml b/odm-cluster.yml index 9fb6e74f..894ec328 100755 --- a/odm-cluster.yml +++ b/odm-cluster.yml @@ -10,8 +10,8 @@ services: ports: - 5432:5432 environment: - - POSTGRES_USER=odm - - POSTGRES_PASSWORD=odm + - POSTGRES_USER=odmusr + - POSTGRES_PASSWORD=odmpwd - POSTGRES_DB=odmdb - PGDATA=/pgdata - SAMPLE=true diff --git a/odm-standalone-postgres.yml b/odm-standalone-postgres.yml index 7f2dccb6..f4ce6f12 100755 --- a/odm-standalone-postgres.yml +++ b/odm-standalone-postgres.yml @@ -6,8 +6,8 @@ services: - 5432:5432 environment: - POSTGRES_DB=odmdb - - POSTGRES_USER=odm - - POSTGRES_PASSWORD=odm + - POSTGRES_USER=odmusr + - POSTGRES_PASSWORD=odmpwd - PGDATA=/pgdata # Uncomment this line to persist your data. Note that on OSX you need to share this # current directory in the Preference menu -> File Sharing menu. @@ -27,8 +27,8 @@ services: # DB_TYPE can be set to "postgres" or "h2". If it is set to "h2" or not set, the H2 embedded database is used. # DB_DRIVER_URL can be used optionally to override the driver that is used by default for PostgreSQL. - DB_NAME=odmdb - - DB_USER=odm - - DB_PASSWORD=odm + - DB_USER=odmusr + - DB_PASSWORD=odmpwd - DB_SERVER_NAME=dbserver # DB_PORT_NUMBER can be used to override the default port number that is 5432 for PostgreSQL. ports: diff --git a/override-mysql.yml b/override-mysql.yml index c9da8dcb..bc96d33d 100755 --- a/override-mysql.yml +++ b/override-mysql.yml @@ -4,10 +4,10 @@ services: build: dockerfile: ./${ODMDOCKERDIR}/databases/mysql/Dockerfile environment: - - MYSQL_ROOT_PASSWORD=odm + - MYSQL_ROOT_PASSWORD=odmpwd - MYSQL_DATABASE=odmdb - - MYSQL_USER=odm - - MYSQL_PASSWORD=odm + - MYSQL_USER=odmusr + - MYSQL_PASSWORD=odmpwd ports: - 3306:3306 diff --git a/standalone-tomcat/Dockerfile b/standalone-tomcat/Dockerfile index adb77379..51362853 100644 --- a/standalone-tomcat/Dockerfile +++ b/standalone-tomcat/Dockerfile @@ -17,7 +17,7 @@ COPY ${ODMDOCKERDIR}/standalone-tomcat/script $SCRIPT RUN chmod -R a+x $SCRIPT # Begin - Configuration for the database -ENV DERBY_URL http://www-eu.apache.org/dist//db/derby/db-derby-10.12.1.1/db-derby-10.12.1.1-bin.tar.gz +ENV DERBY_URL http://archive.apache.org/dist/db/derby/db-derby-10.12.1.1/db-derby-10.12.1.1-bin.tar.gz ENV DERBY_FOLDER db-derby-10.12.1.1-bin RUN wget -nv $DERBY_URL && \ tar xzf ${DERBY_FOLDER}.tar.gz && \ diff --git a/standalone/Dockerfile b/standalone/Dockerfile index 7a123c98..11dbae0d 100644 --- a/standalone/Dockerfile +++ b/standalone/Dockerfile @@ -9,7 +9,6 @@ MAINTAINER "Laurent GRATEAU , ODMDev odmdev_open_sou ENV ODMDOCKERDIR $ODMDOCKERDIR ENV APP_NAME StandaloneOdm ENV SCRIPT /script -ENV DC_PERSISTENCE_LOCALE en_US RUN mkdir /config/resources && \ mkdir -p $SCRIPT && \ mkdir -p /config/dbdata @@ -33,7 +32,7 @@ COPY ${ODMDOCKERDIR}/standalone/script $SCRIPT # Begin - Configuration for the database # Install the driver for H2 and for PostgreSQL RUN wget -nv http://central.maven.org/maven2/com/h2database/h2/1.4.196/h2-1.4.196.jar && mv h2* /config/resources && \ - wget -nv https://jdbc.postgresql.org/download/postgresql-9.3-1104.jdbc4.jar && mv postgres* /config/resources + wget -nv https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar && mv postgres* /config/resources # End - Configuration for the database ENV CONNECTION_POOL_SIZE 20 diff --git a/standalone/script/runserver.sh b/standalone/script/runserver.sh index 48948301..d1459b34 100644 --- a/standalone/script/runserver.sh +++ b/standalone/script/runserver.sh @@ -48,7 +48,7 @@ else fi # End - Configuration for the database -# Change values for the datasource if required +# Begin - Change values for the datasource if required if [ -n "$DB_SERVER_NAME" ] then sed -i 's|dbserver|'$DB_SERVER_NAME'|g' /config/datasource.xml @@ -69,12 +69,15 @@ if [ -n "$DB_PASSWORD" ] then sed -i 's|odmpwd|'$DB_PASSWORD'|g' /config/datasource.xml fi +# End - Change values for the datasource if required if [ -n "$DC_PERSISTENCE_LOCALE" ] then - sed -i 's|DC_PERSISTENCE_LOCALE|'$DC_PERSISTENCE_LOCALE'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties + echo "use DC_PERSISTENCE_LOCALE set to $DC_PERSISTENCE_LOCALE" + sed -i 's|DC_PERSISTENCE_LOCALE|'$DC_PERSISTENCE_LOCALE'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties else - sed -i 's|DC_PERSISTENCE_LOCALE|'en_US'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties + echo "no DC_PERSISTENCE_LOCALE set use default en_US" + sed -i 's|DC_PERSISTENCE_LOCALE|'en_US'|g' /config/apps/decisioncenter.war/WEB-INF/classes/config/decisioncenter-configuration.properties fi # Begin - Add DC Rest Api Web App