From f483c7fdf7a9657d11febe4f8e8c3971cfc1e9c5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Sep 2024 16:14:59 +0200 Subject: [PATCH] Debug load init --- docker-run.sh | 12 ++++++------ images/15.0.3-php7.4/Dockerfile | 1 + images/15.0.3-php7.4/docker-run.sh | 12 ++++++------ images/16.0.5-php8.1/Dockerfile | 1 + images/16.0.5-php8.1/docker-run.sh | 12 ++++++------ images/17.0.4-php8.1/Dockerfile | 1 + images/17.0.4-php8.1/docker-run.sh | 12 ++++++------ images/18.0.5-php8.1/Dockerfile | 1 + images/18.0.5-php8.1/docker-run.sh | 12 ++++++------ images/19.0.3-php8.2/Dockerfile | 1 + images/19.0.3-php8.2/docker-run.sh | 12 ++++++------ images/develop/Dockerfile | 1 + images/develop/docker-run.sh | 12 ++++++------ 13 files changed, 48 insertions(+), 42 deletions(-) diff --git a/docker-run.sh b/docker-run.sh index f4949cd..4233ad8 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -161,7 +161,7 @@ function runScripts() echo "Importing custom ${isExec} from `basename ${file}` ..." echo "Importing custom ${isExec} from `basename ${file}` ..." >> /var/www/documents/initdb.log if [ "$isExec" == "SQL" ] ; then - sed -i 's/--.*//g;' ${file} + sed -i 's/^--.*//g;' ${file} sed -i 's/__ENTITY__/1/g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} >> /var/www/documents/initdb.log 2>&1 elif [ "$isExec" == "PHP" ] ; then @@ -181,7 +181,7 @@ function initializeDatabase() if [[ ${fileSQL} != *.key.sql ]]; then echo "Importing table from `basename ${fileSQL}` ..." echo "Importing table from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} # remove all comment + sed -i 's/--.*//g;' ${fileSQL} # remove all comment because comments into create sql crash the load mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 fi done @@ -189,14 +189,14 @@ function initializeDatabase() for fileSQL in /var/www/html/install/mysql/tables/*.key.sql; do echo "Importing table key from `basename ${fileSQL}` ..." echo "Importing table key from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done for fileSQL in /var/www/html/install/mysql/functions/*.sql; do echo "Importing `basename ${fileSQL}` ..." echo "Importing `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -207,7 +207,7 @@ function initializeDatabase() fi echo "Importing data from `basename ${fileSQL}` ..." echo "Importing data from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} sed -i 's/__ENTITY__/1/g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -250,7 +250,7 @@ function initializeDatabase() echo "Then we load demo data ${fileSQL} ..." echo "Then we load demo data ${fileSQL} ..." >> /var/www/documents/initdb.log - #sed -i 's/--.*//g;' ${fileSQL} + #sed -i 's/^--.*//g;' ${fileSQL} echo "mysql -u ${DOLI_DB_USER} -pxxxxxxx -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1" mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done diff --git a/images/15.0.3-php7.4/Dockerfile b/images/15.0.3-php7.4/Dockerfile index d2efb80..9e84878 100644 --- a/images/15.0.3-php7.4/Dockerfile +++ b/images/15.0.3-php7.4/Dockerfile @@ -65,6 +65,7 @@ RUN apt-get update -y \ libzip-dev \ default-mysql-client \ postgresql-client \ + vim-tiny \ cron \ && apt-get autoremove -y \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ diff --git a/images/15.0.3-php7.4/docker-run.sh b/images/15.0.3-php7.4/docker-run.sh index f4949cd..4233ad8 100755 --- a/images/15.0.3-php7.4/docker-run.sh +++ b/images/15.0.3-php7.4/docker-run.sh @@ -161,7 +161,7 @@ function runScripts() echo "Importing custom ${isExec} from `basename ${file}` ..." echo "Importing custom ${isExec} from `basename ${file}` ..." >> /var/www/documents/initdb.log if [ "$isExec" == "SQL" ] ; then - sed -i 's/--.*//g;' ${file} + sed -i 's/^--.*//g;' ${file} sed -i 's/__ENTITY__/1/g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} >> /var/www/documents/initdb.log 2>&1 elif [ "$isExec" == "PHP" ] ; then @@ -181,7 +181,7 @@ function initializeDatabase() if [[ ${fileSQL} != *.key.sql ]]; then echo "Importing table from `basename ${fileSQL}` ..." echo "Importing table from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} # remove all comment + sed -i 's/--.*//g;' ${fileSQL} # remove all comment because comments into create sql crash the load mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 fi done @@ -189,14 +189,14 @@ function initializeDatabase() for fileSQL in /var/www/html/install/mysql/tables/*.key.sql; do echo "Importing table key from `basename ${fileSQL}` ..." echo "Importing table key from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done for fileSQL in /var/www/html/install/mysql/functions/*.sql; do echo "Importing `basename ${fileSQL}` ..." echo "Importing `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -207,7 +207,7 @@ function initializeDatabase() fi echo "Importing data from `basename ${fileSQL}` ..." echo "Importing data from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} sed -i 's/__ENTITY__/1/g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -250,7 +250,7 @@ function initializeDatabase() echo "Then we load demo data ${fileSQL} ..." echo "Then we load demo data ${fileSQL} ..." >> /var/www/documents/initdb.log - #sed -i 's/--.*//g;' ${fileSQL} + #sed -i 's/^--.*//g;' ${fileSQL} echo "mysql -u ${DOLI_DB_USER} -pxxxxxxx -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1" mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done diff --git a/images/16.0.5-php8.1/Dockerfile b/images/16.0.5-php8.1/Dockerfile index 1ba229e..b94b77b 100644 --- a/images/16.0.5-php8.1/Dockerfile +++ b/images/16.0.5-php8.1/Dockerfile @@ -65,6 +65,7 @@ RUN apt-get update -y \ libzip-dev \ default-mysql-client \ postgresql-client \ + vim-tiny \ cron \ && apt-get autoremove -y \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ diff --git a/images/16.0.5-php8.1/docker-run.sh b/images/16.0.5-php8.1/docker-run.sh index f4949cd..4233ad8 100755 --- a/images/16.0.5-php8.1/docker-run.sh +++ b/images/16.0.5-php8.1/docker-run.sh @@ -161,7 +161,7 @@ function runScripts() echo "Importing custom ${isExec} from `basename ${file}` ..." echo "Importing custom ${isExec} from `basename ${file}` ..." >> /var/www/documents/initdb.log if [ "$isExec" == "SQL" ] ; then - sed -i 's/--.*//g;' ${file} + sed -i 's/^--.*//g;' ${file} sed -i 's/__ENTITY__/1/g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} >> /var/www/documents/initdb.log 2>&1 elif [ "$isExec" == "PHP" ] ; then @@ -181,7 +181,7 @@ function initializeDatabase() if [[ ${fileSQL} != *.key.sql ]]; then echo "Importing table from `basename ${fileSQL}` ..." echo "Importing table from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} # remove all comment + sed -i 's/--.*//g;' ${fileSQL} # remove all comment because comments into create sql crash the load mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 fi done @@ -189,14 +189,14 @@ function initializeDatabase() for fileSQL in /var/www/html/install/mysql/tables/*.key.sql; do echo "Importing table key from `basename ${fileSQL}` ..." echo "Importing table key from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done for fileSQL in /var/www/html/install/mysql/functions/*.sql; do echo "Importing `basename ${fileSQL}` ..." echo "Importing `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -207,7 +207,7 @@ function initializeDatabase() fi echo "Importing data from `basename ${fileSQL}` ..." echo "Importing data from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} sed -i 's/__ENTITY__/1/g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -250,7 +250,7 @@ function initializeDatabase() echo "Then we load demo data ${fileSQL} ..." echo "Then we load demo data ${fileSQL} ..." >> /var/www/documents/initdb.log - #sed -i 's/--.*//g;' ${fileSQL} + #sed -i 's/^--.*//g;' ${fileSQL} echo "mysql -u ${DOLI_DB_USER} -pxxxxxxx -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1" mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done diff --git a/images/17.0.4-php8.1/Dockerfile b/images/17.0.4-php8.1/Dockerfile index cf8b20f..4c1ebc4 100644 --- a/images/17.0.4-php8.1/Dockerfile +++ b/images/17.0.4-php8.1/Dockerfile @@ -65,6 +65,7 @@ RUN apt-get update -y \ libzip-dev \ default-mysql-client \ postgresql-client \ + vim-tiny \ cron \ && apt-get autoremove -y \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ diff --git a/images/17.0.4-php8.1/docker-run.sh b/images/17.0.4-php8.1/docker-run.sh index f4949cd..4233ad8 100755 --- a/images/17.0.4-php8.1/docker-run.sh +++ b/images/17.0.4-php8.1/docker-run.sh @@ -161,7 +161,7 @@ function runScripts() echo "Importing custom ${isExec} from `basename ${file}` ..." echo "Importing custom ${isExec} from `basename ${file}` ..." >> /var/www/documents/initdb.log if [ "$isExec" == "SQL" ] ; then - sed -i 's/--.*//g;' ${file} + sed -i 's/^--.*//g;' ${file} sed -i 's/__ENTITY__/1/g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} >> /var/www/documents/initdb.log 2>&1 elif [ "$isExec" == "PHP" ] ; then @@ -181,7 +181,7 @@ function initializeDatabase() if [[ ${fileSQL} != *.key.sql ]]; then echo "Importing table from `basename ${fileSQL}` ..." echo "Importing table from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} # remove all comment + sed -i 's/--.*//g;' ${fileSQL} # remove all comment because comments into create sql crash the load mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 fi done @@ -189,14 +189,14 @@ function initializeDatabase() for fileSQL in /var/www/html/install/mysql/tables/*.key.sql; do echo "Importing table key from `basename ${fileSQL}` ..." echo "Importing table key from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done for fileSQL in /var/www/html/install/mysql/functions/*.sql; do echo "Importing `basename ${fileSQL}` ..." echo "Importing `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -207,7 +207,7 @@ function initializeDatabase() fi echo "Importing data from `basename ${fileSQL}` ..." echo "Importing data from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} sed -i 's/__ENTITY__/1/g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -250,7 +250,7 @@ function initializeDatabase() echo "Then we load demo data ${fileSQL} ..." echo "Then we load demo data ${fileSQL} ..." >> /var/www/documents/initdb.log - #sed -i 's/--.*//g;' ${fileSQL} + #sed -i 's/^--.*//g;' ${fileSQL} echo "mysql -u ${DOLI_DB_USER} -pxxxxxxx -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1" mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done diff --git a/images/18.0.5-php8.1/Dockerfile b/images/18.0.5-php8.1/Dockerfile index 28769a8..9c00fec 100644 --- a/images/18.0.5-php8.1/Dockerfile +++ b/images/18.0.5-php8.1/Dockerfile @@ -65,6 +65,7 @@ RUN apt-get update -y \ libzip-dev \ default-mysql-client \ postgresql-client \ + vim-tiny \ cron \ && apt-get autoremove -y \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ diff --git a/images/18.0.5-php8.1/docker-run.sh b/images/18.0.5-php8.1/docker-run.sh index f4949cd..4233ad8 100755 --- a/images/18.0.5-php8.1/docker-run.sh +++ b/images/18.0.5-php8.1/docker-run.sh @@ -161,7 +161,7 @@ function runScripts() echo "Importing custom ${isExec} from `basename ${file}` ..." echo "Importing custom ${isExec} from `basename ${file}` ..." >> /var/www/documents/initdb.log if [ "$isExec" == "SQL" ] ; then - sed -i 's/--.*//g;' ${file} + sed -i 's/^--.*//g;' ${file} sed -i 's/__ENTITY__/1/g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} >> /var/www/documents/initdb.log 2>&1 elif [ "$isExec" == "PHP" ] ; then @@ -181,7 +181,7 @@ function initializeDatabase() if [[ ${fileSQL} != *.key.sql ]]; then echo "Importing table from `basename ${fileSQL}` ..." echo "Importing table from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} # remove all comment + sed -i 's/--.*//g;' ${fileSQL} # remove all comment because comments into create sql crash the load mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 fi done @@ -189,14 +189,14 @@ function initializeDatabase() for fileSQL in /var/www/html/install/mysql/tables/*.key.sql; do echo "Importing table key from `basename ${fileSQL}` ..." echo "Importing table key from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done for fileSQL in /var/www/html/install/mysql/functions/*.sql; do echo "Importing `basename ${fileSQL}` ..." echo "Importing `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -207,7 +207,7 @@ function initializeDatabase() fi echo "Importing data from `basename ${fileSQL}` ..." echo "Importing data from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} sed -i 's/__ENTITY__/1/g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -250,7 +250,7 @@ function initializeDatabase() echo "Then we load demo data ${fileSQL} ..." echo "Then we load demo data ${fileSQL} ..." >> /var/www/documents/initdb.log - #sed -i 's/--.*//g;' ${fileSQL} + #sed -i 's/^--.*//g;' ${fileSQL} echo "mysql -u ${DOLI_DB_USER} -pxxxxxxx -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1" mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done diff --git a/images/19.0.3-php8.2/Dockerfile b/images/19.0.3-php8.2/Dockerfile index 26cd992..58d35c0 100644 --- a/images/19.0.3-php8.2/Dockerfile +++ b/images/19.0.3-php8.2/Dockerfile @@ -65,6 +65,7 @@ RUN apt-get update -y \ libzip-dev \ default-mysql-client \ postgresql-client \ + vim-tiny \ cron \ && apt-get autoremove -y \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ diff --git a/images/19.0.3-php8.2/docker-run.sh b/images/19.0.3-php8.2/docker-run.sh index f4949cd..4233ad8 100755 --- a/images/19.0.3-php8.2/docker-run.sh +++ b/images/19.0.3-php8.2/docker-run.sh @@ -161,7 +161,7 @@ function runScripts() echo "Importing custom ${isExec} from `basename ${file}` ..." echo "Importing custom ${isExec} from `basename ${file}` ..." >> /var/www/documents/initdb.log if [ "$isExec" == "SQL" ] ; then - sed -i 's/--.*//g;' ${file} + sed -i 's/^--.*//g;' ${file} sed -i 's/__ENTITY__/1/g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} >> /var/www/documents/initdb.log 2>&1 elif [ "$isExec" == "PHP" ] ; then @@ -181,7 +181,7 @@ function initializeDatabase() if [[ ${fileSQL} != *.key.sql ]]; then echo "Importing table from `basename ${fileSQL}` ..." echo "Importing table from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} # remove all comment + sed -i 's/--.*//g;' ${fileSQL} # remove all comment because comments into create sql crash the load mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 fi done @@ -189,14 +189,14 @@ function initializeDatabase() for fileSQL in /var/www/html/install/mysql/tables/*.key.sql; do echo "Importing table key from `basename ${fileSQL}` ..." echo "Importing table key from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done for fileSQL in /var/www/html/install/mysql/functions/*.sql; do echo "Importing `basename ${fileSQL}` ..." echo "Importing `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -207,7 +207,7 @@ function initializeDatabase() fi echo "Importing data from `basename ${fileSQL}` ..." echo "Importing data from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} sed -i 's/__ENTITY__/1/g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -250,7 +250,7 @@ function initializeDatabase() echo "Then we load demo data ${fileSQL} ..." echo "Then we load demo data ${fileSQL} ..." >> /var/www/documents/initdb.log - #sed -i 's/--.*//g;' ${fileSQL} + #sed -i 's/^--.*//g;' ${fileSQL} echo "mysql -u ${DOLI_DB_USER} -pxxxxxxx -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1" mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done diff --git a/images/develop/Dockerfile b/images/develop/Dockerfile index de0b78e..75177da 100644 --- a/images/develop/Dockerfile +++ b/images/develop/Dockerfile @@ -65,6 +65,7 @@ RUN apt-get update -y \ libzip-dev \ default-mysql-client \ postgresql-client \ + vim-tiny \ cron \ && apt-get autoremove -y \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ diff --git a/images/develop/docker-run.sh b/images/develop/docker-run.sh index f4949cd..4233ad8 100755 --- a/images/develop/docker-run.sh +++ b/images/develop/docker-run.sh @@ -161,7 +161,7 @@ function runScripts() echo "Importing custom ${isExec} from `basename ${file}` ..." echo "Importing custom ${isExec} from `basename ${file}` ..." >> /var/www/documents/initdb.log if [ "$isExec" == "SQL" ] ; then - sed -i 's/--.*//g;' ${file} + sed -i 's/^--.*//g;' ${file} sed -i 's/__ENTITY__/1/g;' ${file} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${file} >> /var/www/documents/initdb.log 2>&1 elif [ "$isExec" == "PHP" ] ; then @@ -181,7 +181,7 @@ function initializeDatabase() if [[ ${fileSQL} != *.key.sql ]]; then echo "Importing table from `basename ${fileSQL}` ..." echo "Importing table from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} # remove all comment + sed -i 's/--.*//g;' ${fileSQL} # remove all comment because comments into create sql crash the load mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 fi done @@ -189,14 +189,14 @@ function initializeDatabase() for fileSQL in /var/www/html/install/mysql/tables/*.key.sql; do echo "Importing table key from `basename ${fileSQL}` ..." echo "Importing table key from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done for fileSQL in /var/www/html/install/mysql/functions/*.sql; do echo "Importing `basename ${fileSQL}` ..." echo "Importing `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -207,7 +207,7 @@ function initializeDatabase() fi echo "Importing data from `basename ${fileSQL}` ..." echo "Importing data from `basename ${fileSQL}` ..." >> /var/www/documents/initdb.log - sed -i 's/--.*//g;' ${fileSQL} + sed -i 's/^--.*//g;' ${fileSQL} sed -i 's/__ENTITY__/1/g;' ${fileSQL} mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done @@ -250,7 +250,7 @@ function initializeDatabase() echo "Then we load demo data ${fileSQL} ..." echo "Then we load demo data ${fileSQL} ..." >> /var/www/documents/initdb.log - #sed -i 's/--.*//g;' ${fileSQL} + #sed -i 's/^--.*//g;' ${fileSQL} echo "mysql -u ${DOLI_DB_USER} -pxxxxxxx -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1" mysql -u ${DOLI_DB_USER} -p${DOLI_DB_PASSWORD} -h ${DOLI_DB_HOST} -P ${DOLI_DB_HOST_PORT} ${DOLI_DB_NAME} < ${fileSQL} >> /var/www/documents/initdb.log 2>&1 done