diff --git a/apps/samourai-server/docker-compose.yml b/apps/samourai-server/docker-compose.yml index 5aa963b..cd4227f 100644 --- a/apps/samourai-server/docker-compose.yml +++ b/apps/samourai-server/docker-compose.yml @@ -25,7 +25,7 @@ services: image: louneskmt/dojo-nodejs:1.10.1@sha256:d1460df18df091837718fcd0a6d3850e2f1a4a49da5914a697648c40d5477184 init: true restart: on-failure - command: "/home/node/app/wait-for-it.sh db:3306 --timeout=720 --strict -- /home/node/app/restart.sh" + command: "/home/node/app/wait-for-it.sh ${APP_SAMOURAI_SERVER_DB_IP}:3306 --timeout=720 --strict -- /home/node/app/restart.sh" user: "1000:1000" environment: # GLOBAL diff --git a/scripts/update/01-run.sh b/scripts/update/01-run.sh index fba6f0e..e53649c 100755 --- a/scripts/update/01-run.sh +++ b/scripts/update/01-run.sh @@ -203,6 +203,14 @@ if [[ -d "${samourai_app_dir}" ]] && [[ -d "${samourai_data_dir}" ]]; then rsync --archive --verbose "${samourai_app_dir}/" "${samourai_data_dir}" fi +# Handle updating mysql conf for samourai-server app +samourai_app_mysql_conf="${UMBREL_ROOT}/apps/samourai-server/mysql/mysql-dojo.cnf" +samourai_data_mysql_conf="${UMBREL_ROOT}/app-data/samourai-server/mysql/mysql-dojo.cnf" +if [[ -f "${samourai_app_mysql_conf}" ]] && [[ -f "${samourai_data_mysql_conf}" ]]; then + echo "Found samourai-server install, attempting to update DB configuration..." + cp "${samourai_app_mysql_conf}" "${samourai_data_mysql_conf}" +fi + # Handle hidden service migration for samourai-server app samourai_app_dojo_tor_dir="${UMBREL_ROOT}/tor/data/app-samourai-server" samourai_app_new_dojo_tor_dir="${UMBREL_ROOT}/tor/data/app-samourai-server-dojo"