From b173ca2fd0d7cfb33a0c0ad613d6055709b2df98 Mon Sep 17 00:00:00 2001 From: Stu Tomlinson Date: Fri, 25 Sep 2020 18:13:35 +0100 Subject: Fix docker DB initialization The docker local copies of DB initialization scripts were out of sync with the master copies. Instead of updating local copies, adjust docker compose to reference master copies directly. Also change docker config to use docker volumes instead of mounted directories for all DB data. --- test/docker/README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'test/docker/README.md') diff --git a/test/docker/README.md b/test/docker/README.md index 24c675cab..b19321215 100644 --- a/test/docker/README.md +++ b/test/docker/README.md @@ -20,9 +20,7 @@ You can stop all the databases with CTRL-C. The following commands will create the necessary login, user and database, will grant rights on the database in MSSQL and create the ejabberd schema: ``` -docker cp test/docker/db/mssql/initdb/initdb_mssql.sql ejabberd-mssql:/ docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -i /initdb_mssql.sql -docker cp sql/mssql.sql ejabberd-mssql:/ docker exec ejabberd-mssql /opt/mssql-tools/bin/sqlcmd -U SA -P ejabberd_Test1 -S localhost -i /mssql.sql ``` @@ -49,10 +47,10 @@ You can fully clean up the environment with: (cd test/docker; docker-compose down) ``` -If you want to clean the data, you can remove the data directories after the `docker-compose down` command: +If you want to clean the data, you can remove the data volumes after the `docker-compose down` command: ``` -rm -rf test/docker/db/mysql/data -rm -rf test/docker/db/postgres/data -docker volume rm docker_mssqldata +docker volume rm ejabberd-mysqldata +docker volume rm ejabberd-mssqldata +docker volume rm ejabberd-pgsqldata ``` -- cgit v1.2.3