HHH-18267 Informix docker image configured

This commit is contained in:
Vladimír Kuruc 2024-06-13 15:44:46 +02:00 committed by Christian Beikov
parent 3d72ab25f0
commit a2aa6309cd
2 changed files with 14 additions and 7 deletions

View File

@ -957,17 +957,19 @@ informix_14_10() {
# Give the container some time to start
OUTPUT=
n=0
until [ "$n" -ge 10 ]
until [ "$n" -ge 5 ]
do
OUTPUT=$($CONTAINER_CLI logs informix 2>&1)
OUTPUT=$($PRIVILEGED_CLI $CONTAINER_CLI logs informix 2>&1)
if [[ $OUTPUT == *"Server Started"* ]]; then
sleep 15
$PRIVILEGED_CLI $CONTAINER_CLI exec informix bash -l -c "echo \"execute function task('create dbspace from storagepool', 'datadbs', '100 MB', '4');execute function task('create sbspace from storagepool', 'sbspace', '20 M', '0');create database dev in datadbs with log nlscase sensitive;\" > post_init.sql;dbaccess sysadmin post_init.sql"
break;
fi
n=$((n+1))
echo "Waiting for Informix to start..."
sleep 30
done
if [ "$n" -ge 10 ]; then
if [ "$n" -ge 5 ]; then
echo "Informix failed to start and configure after 5 minutes"
else
echo "Informix successfully started"
@ -981,17 +983,19 @@ informix_12_10() {
# Give the container some time to start
OUTPUT=
n=0
until [ "$n" -ge 10 ]
until [ "$n" -ge 5 ]
do
OUTPUT=$($CONTAINER_CLI logs informix 2>&1)
OUTPUT=$($PRIVILEGED_CLI $CONTAINER_CLI logs informix 2>&1)
if [[ $OUTPUT == *"login Information"* ]]; then
sleep 15
$PRIVILEGED_CLI $CONTAINER_CLI exec informix bash -l -c "echo \"execute function task('create dbspace from storagepool', 'datadbs', '100 MB', '4');execute function task('create sbspace from storagepool', 'sbspace', '20 M', '0');create database dev in datadbs with log nlscase sensitive;\" > post_init.sql;dbaccess sysadmin post_init.sql"
break;
fi
n=$((n+1))
echo "Waiting for Informix to start..."
sleep 30
done
if [ "$n" -ge 10 ]; then
if [ "$n" -ge 5 ]; then
echo "Informix failed to start and configure after 5 minutes"
else
echo "Informix successfully started"
@ -1038,6 +1042,9 @@ if [ -z ${1} ]; then
echo -e "\tsybase"
echo -e "\ttidb"
echo -e "\ttidb_5_4"
echo -e "\informix"
echo -e "\informix_14_10"
echo -e "\informix_12_10"
else
${1}
fi

View File

@ -295,7 +295,7 @@ ext {
'jdbc.driver': 'com.informix.jdbc.IfxDriver',
'jdbc.user' : 'informix',
'jdbc.pass' : 'in4mix',
'jdbc.url' : 'jdbc:informix-sqli://' + dbHost + ':9088/sysuser:INFORMIXSERVER=informix;user=informix;password=in4mix;DELIMIDENT=Y',
'jdbc.url' : 'jdbc:informix-sqli://' + dbHost + ':9088/dev:INFORMIXSERVER=informix;user=informix;password=in4mix;DELIMIDENT=Y',
'jdbc.datasource' : 'com.informix.jdbc.IfxDriver',
// 'jdbc.datasource' : 'com.informix.jdbcx.IfxDataSource',
'connection.init_sql' : ''