From bb09cd2c2a46503cb1c4844b8a2b977bc301f09c Mon Sep 17 00:00:00 2001 From: James Loh Date: Wed, 9 Jul 2025 17:05:13 +1000 Subject: [PATCH] Start MySQL container earlier on in migration - The idea here is this can start up and do its thing in the background whilst we're rsync'ing content and saves us waiting longer later on --- scripts/migrate.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/migrate.sh b/scripts/migrate.sh index bca39f7..fa29c8a 100644 --- a/scripts/migrate.sh +++ b/scripts/migrate.sh @@ -264,10 +264,6 @@ migrate_database() { dump_size=$(human_readable "$(stat -c%s "$TEMP_SQL_FILE")") echo "✓ Database exported successfully ($dump_size)" - # Start MySQL container - echo "Starting MySQL container..." - docker compose up db -d - # Wait for MySQL to be ready echo -n "Waiting for MySQL container to be ready" local counter=0 @@ -542,6 +538,10 @@ main() { systemctl disable "$ghost_service_name" 2>/dev/null || true echo "✓ Ghost service stopped" + # Start MySQL container + echo "Starting MySQL container for migration..." + docker compose up db -d + # Migrate content echo "" migrate_content