Open devphoenix2404 opened 1 year ago
Did you created a volume for your mysql container data to be persisted ?
A guide is coming soon (by the end of the week) on devdocs to use Docker with PrestaShop, with database/installation persistence. Will keep you updated 👍
Hi team,
I am facing an issue, where the DB dropped even if the value of the $PS_ERASE_DB and $PS_INSTALL_DB is 0.
Here
`#!/bin/sh
if [ "$DB_SERVER" = "" -a $PS_INSTALL_AUTO = 1 ]; then
echo >&2 'error: You requested automatic PrestaShop installation but MySQL server address is not provided '
echo >&2 ' You need to specify DB_SERVER in order to proceed'
exit 1
elif [ "$DB_SERVER" != "" -a $PS_INSTALL_AUTO = 1 ]; then
echo "\n Checking if $DB_SERVER is available..."
mysql -h $DB_SERVER -P $DB_PORT -u $DB_USER -p$DB_PASSWD -e "status" > /dev/null 2>&1
echo "\n DB server $DB_SERVER is available, let's continue !"
fi
From now, stop at error
set -e
if [ ! -f ./config/settings.inc.php ] && [ ! -f ./install.lock ]; then
elif [ ! -f ./config/settings.inc.php ] && [ -f ./install.lock ]; then
elif [ -f ./config/settings.inc.php ] && [ -f ./install.lock ]; then
else echo "\n* PrestaShop Core already installed..."; fi
if [ $PS_DEMO_MODE -ne 0 ]; then echo "\n* Enabling DEMO mode ..."; sed -ie "s/define('_PS_MODEDEMO', false);/define('_PS_MODEDEMO',\ true);/g" /var/www/html/config/defines.inc.php fi
echo "\n* Almost ! Starting web server now\n";
if [ -d /tmp/init-scripts/ ]; then echo "\n Running init script(s)..." for i in
ls /tmp/init-scripts/
;do /tmp/init-scripts/$i done else echo "\n No init script found, let's continue..." fiecho "\n* Set the ownership..." chown -R www-data:www-data /var/www/html/modules
exec apache2-foreground `