~mser/vmangos-docker

1a9161c4b22604d6be2e9ea5d0a0e94a1b588a5c — Michael Serajnik 5 months ago bf6a0a9
Disable docker-compose exec pseudo-tty allocation
3 files changed, 14 insertions(+), 14 deletions(-)

M 00-create-database-backup.sh
M 00-update-including-world-database-import.sh
M 00-update.sh
M 00-create-database-backup.sh => 00-create-database-backup.sh +5 -5
@@ 35,15 35,15 @@ sleep 60

echo "[VMaNGOS]: Backing up databases..."

docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  'rm -rf /backup/*'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  'mysqldump -h 127.0.0.1 -u root -p$MYSQL_ROOT_PASSWORD mangos > /backup/mangos.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  'mysqldump -h 127.0.0.1 -u root -p$MYSQL_ROOT_PASSWORD characters > /backup/characters.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  'mysqldump -h 127.0.0.1 -u root -p$MYSQL_ROOT_PASSWORD realmd > /backup/realmd.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  'chown -R $VMANGOS_USER_ID:$VMANGOS_GROUP_ID /backup'

echo "[VMaNGOS]: Recreating other containers..."

M 00-update-including-world-database-import.sh => 00-update-including-world-database-import.sh +5 -5
@@ 85,15 85,15 @@ sleep 60

echo "[VMaNGOS]: Importing database updates..."

docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/world_database/$VMANGOS_WORLD.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD < /sql/regenerate-world-db.sql && mysql -u root -p$MYSQL_ROOT_PASSWORD mangos < /opt/vmangos/sql/world_database/$VMANGOS_WORLD.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/world_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD mangos < /opt/vmangos/sql/migrations/world_db_updates.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/characters_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD characters < /opt/vmangos/sql/migrations/characters_db_updates.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/logon_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD realmd < /opt/vmangos/sql/migrations/logon_db_updates.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/logs_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD realmd < /opt/vmangos/sql/migrations/logs_db_updates.sql'

echo "[VMaNGOS]: Recreating other containers..."

M 00-update.sh => 00-update.sh +4 -4
@@ 95,13 95,13 @@ sleep 60

echo "[VMaNGOS]: Importing database updates..."

docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/world_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD mangos < /opt/vmangos/sql/migrations/world_db_updates.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/characters_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD characters < /opt/vmangos/sql/migrations/characters_db_updates.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/logon_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD realmd < /opt/vmangos/sql/migrations/logon_db_updates.sql'
docker-compose exec vmangos_database sh -c \
docker-compose exec -T vmangos_database sh -c \
  '[ -e /opt/vmangos/sql/migrations/logs_db_updates.sql ] && mysql -u root -p$MYSQL_ROOT_PASSWORD realmd < /opt/vmangos/sql/migrations/logs_db_updates.sql'

echo "[VMaNGOS]: Recreating other containers..."