[PATCH 2/3] docker: Simplify MySQL reset

Stephen Finucane stephen at that.guru
Wed Sep 4 03:03:03 AEST 2019


Just use the hardcoded configuration.

Signed-off-by: Stephen Finucane <stephen at that.guru>
---
 tools/docker/Dockerfile    | 3 ---
 tools/docker/entrypoint.sh | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 81700711..556085ce 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -8,9 +8,6 @@ RUN [ -n "$UID" ] || { echo "You must define UID in .env" 1>&2; exit 1; }
 
 ENV PROJECT_HOME /home/patchwork/patchwork
 
-ENV db_user root
-ENV db_pass password
-
 ENV DJANGO_SETTINGS_MODULE patchwork.settings.dev
 ENV DEBIAN_FRONTEND noninteractive
 ENV PYTHONUNBUFFERED 1
diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
index d2b094bd..08fa1906 100755
--- a/tools/docker/entrypoint.sh
+++ b/tools/docker/entrypoint.sh
@@ -22,7 +22,7 @@ test_database() {
 }
 
 reset_data_mysql() {
-    mysql -u$db_user -p$db_pass -h $PW_TEST_DB_HOST << EOF
+    mysql -uroot -ppassword -h $PW_TEST_DB_HOST << EOF
 DROP DATABASE IF EXISTS patchwork;
 CREATE DATABASE patchwork CHARACTER SET utf8;
 GRANT ALL ON patchwork.* TO 'patchwork' IDENTIFIED BY 'password';
-- 
2.21.0



More information about the Patchwork mailing list