ejabberd + Biboumi + Docker = 🌞💬

admin 6bf0ddca31 copy key in acme_post_hook to preserve permissions 6 ヶ月 前
.vscode b7a2093bbd initial 2 年 前
EXTRAS e7ff561bab Added another reference 2 年 前
data 6bf0ddca31 copy key in acme_post_hook to preserve permissions 6 ヶ月 前
.env.example e08a86e094 fixed typo 2 年 前
.gitignore 8770b6a44b fixed/reworked setting hostname/ip config 2 年 前
LICENSE 3981f316eb removed (c) 2 年 前
README.db-migration.md 8aa56bd0b1 initial 2 年 前
README.md 319cb0a9b4 added missing slash in volume paths 2 年 前
RELEASE.md bddabd12f8 updated TASKS/RELEASE 2 年 前
TASKS.md fd0718a02a added turn test task 2 年 前
docker-compose.yml 6bf0ddca31 copy key in acme_post_hook to preserve permissions 6 ヶ月 前
entrypoint.sh 1adc140ecd overwrite existing custom.yml 2 年 前

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' ´´´