ckayfish wroteIt sounds like you’re using a bridge network in docker. That IP can keep changing on you, but you can use the name of the db’s docker container to always resolve to its current IP address.
OK, I just want to say that I have now changed it from the IP to the name of the db’s docker container and this seems to be working well.
For anybody else that would find this useful, navigate to:
/config/www/gallery/local/config
then
nano database.inc.php
<?php
$conf['dblayer'] = 'mysqli';
$conf['db_base'] = 'piwigo';
$conf['db_user'] = 'piwigo';
$conf['db_password'] = 'piwigo';
$conf['db_host'] =
change the IP ADDRESS HERE to the name of name of the db’s docker container;
$prefixeTable = 'piwigo_';
define('PHPWG_INSTALLED', true);
define('PWG_CHARSET', 'utf-8');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
?>
Hopefully I will not lose the connection again now.
Thanks for the advice,
Nick.