ejabberd + Biboumi + Docker = 🌞💬

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

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