Sample project with basic docker-compose commands to migrate a mysql db to postgres db.
Put .sql
files to ./data/mysql
for initialization.
Also postgres .sql
files can be added to ./data/postgres
for postgres db initialization if needed.
docker-compose up -d mysqldb phpmyadmin postgresdb pgadmin
or
docker-compose up -d mysqldb postgresdb
Run after initializations are complete.
docker-compose run --rm pgloader pgloader mysql:https://root:admin@mysqldb/public postgresql:https://root:admin@postgresdb/bar
docker-compose exec postgresdb bash -c "pg_dump -U root bar > /output/bar.sql"