ejabberd + Biboumi + Docker = ๐ŸŒž๐Ÿ’ฌ

Toastie 8aa56bd0b1 initial 1 month ago
.vscode b7a2093bbd initial 7 months ago
EXTRAS e7ff561bab Added another reference 4 months ago
data 57343f072b disabled scram as possibly not compatible with stun/turn auth 6 months ago
.env.example e08a86e094 fixed typo 6 months ago
.gitignore 8770b6a44b fixed/reworked setting hostname/ip config 7 months ago
LICENSE 3981f316eb removed (c) 6 months ago
README.db-migration.md 8aa56bd0b1 initial 1 month ago
README.md 319cb0a9b4 added missing slash in volume paths 6 months ago
RELEASE.md bddabd12f8 updated TASKS/RELEASE 6 months ago
TASKS.md fd0718a02a added turn test task 6 months ago
docker-compose.yml ad57197707 upgraded to 22.05 3 months ago
entrypoint.sh 1adc140ecd overwrite existing custom.yml 6 months ago

README.db-migration.md

Create database

ยดยดยด cd /opt/docker/db/utils/ ./create_db.sh ejabberd ยดยดยด

Get schema and populate tables

ยดยดยด docker cp ejabberd:/home/ejabberd/database/mysql.sql . docker cp mysql.sql db:/ rm mysql.sql docker exec db sh -c 'mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD < /mysql.sql' docker exec db sh -c 'echo "SHOW TABLES;" | mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD --table' docker exec db sh -c 'rm /mysql.sql' ยดยดยด

Backup existing installation, in case something goes wrong

ยดยดยด cd /opt/docker/ejabberd docker compose down cd /opt/docker/ tar cfj ejabberd.tar.bz2 ejabberd ยดยดยด

Disable ports for the migration to avoid connections

ยดยดยด cd /opt/docker/ejabberd vi docker-compose.yml ## comment out ports ยดยดยด

Setup DB config for ejabberd

ยดยดยด vi /opt/docker/ejabberd/data/conf.custom/db.yml default_db: sql sql_type: mysql sql_server: "db" sql_database: "ejabberd" sql_username: "ejabberd" sql_password: "PutYourSecretPasswordHere" docker compose up -d ยดยดยด

Dump Mnesia database and restore in MariaDB

ยดยดยด docker exec ejabberd sh -c 'bin/ejabberdctl --no-timeout export2sql im.s-up.net /tmp/sqldump.sql' docker cp ejabberd:/tmp/sqldump.sql . docker exec ejabberd sh -c 'rm /tmp/sqldump.sql' docker cp sqldump.sql db:/ rm sqldump.sql docker exec db sh -c 'mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD < /sqldump.sql' ยดยดยด

Enable ports for the migration to avoid connections

ยดยดยด cd /opt/docker/ejabberd vi docker-compose.yml ## comment out ports

Debugging: Start a sql shell

ยดยดยด docker exec -it db sh -c 'mysql -D ejabberd -p$MYSQL_ROOT_PASSWORD' ยดยดยด