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
This commit is contained in:
James Loh
2025-07-09 17:05:13 +10:00
parent 511a50079f
commit bb09cd2c2a

View File

@@ -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