Add migration script for Ghost CLI -> Docker installs

- This script handles the copy of both assets and the MySQL database
  from an existing install to a new Docker based install
- Its currently been tested on the "happy path" of a Ghost CLI install
  and works
This commit is contained in:
James Loh
2025-06-24 16:00:10 +10:00
parent 946dff3b76
commit e065e8667c
3 changed files with 134 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ set -u
if [ -n "$MYSQL_MULTIPLE_DATABASES" ]; then
echo "Creating multiple databases: $MYSQL_MULTIPLE_DATABASES"
for db in $(echo $MYSQL_MULTIPLE_DATABASES | tr ',' ' '); do
for db in $(echo "$MYSQL_MULTIPLE_DATABASES" | tr ',' ' '); do
echo "Creating database: $db"
mysql -u root -p"$MYSQL_ROOT_PASSWORD" <<-EOSQL
CREATE DATABASE IF NOT EXISTS \`$db\`;