From 5860725f5755c957d28da3cd108b5421f502052d Mon Sep 17 00:00:00 2001 From: Vincent Massol <vincent@massol.net> Date: Fri, 10 Feb 2017 16:16:39 +0100 Subject: [PATCH] [Misc] Fix typo in docker-entrypoint.sh that prevented using a custom mysql user name + Removed unnecessary env variable at runtime --- README.md | 4 ++-- xwiki-mysql-tomcat/docker-compose-using.yml | 3 +-- xwiki-mysql-tomcat/xwiki/docker-entrypoint.sh | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index df5a1f1..c82325c 100644 --- a/README.md +++ b/README.md @@ -73,11 +73,11 @@ services: - db ports: - "8080:8080" - volumes: - - xwiki-data:/usr/local/xwiki environment: - MYSQL_USER=xwiki - MYSQL_PASSWORD=xwiki + volumes: + - xwiki-data:/usr/local/xwiki db: image: "mysql:5.7" volumes: diff --git a/xwiki-mysql-tomcat/docker-compose-using.yml b/xwiki-mysql-tomcat/docker-compose-using.yml index 7f67467..da20410 100644 --- a/xwiki-mysql-tomcat/docker-compose-using.yml +++ b/xwiki-mysql-tomcat/docker-compose-using.yml @@ -27,11 +27,10 @@ services: - db ports: - "8080:8080" - # The MYSQL_USER/MYSQL_PASSWORD/MYSQL_DATABASE variables are used in the hibernate.cfg.xml file. + # The MYSQL_USER/MYSQL_PASSWORD variables are used in the hibernate.cfg.xml file. environment: - MYSQL_USER=xwiki - MYSQL_PASSWORD=xwiki - - MYSQL_DATABASE=xwiki # Provide a name instead of an auto-generated id for the xwiki permanent directory configured in the Dockerfile, # to make it simpler to identify in 'docker volume ls'. volumes: diff --git a/xwiki-mysql-tomcat/xwiki/docker-entrypoint.sh b/xwiki-mysql-tomcat/xwiki/docker-entrypoint.sh index a1f9367..de51cef 100755 --- a/xwiki-mysql-tomcat/xwiki/docker-entrypoint.sh +++ b/xwiki-mysql-tomcat/xwiki/docker-entrypoint.sh @@ -47,7 +47,7 @@ function xwiki_set_properties() { function configure() { echo 'Configuring XWiki...' - sed -i "s/replacemysqluser/${MYSQL_USERNAME:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml + sed -i "s/replacemysqluser/${MYSQL_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml sed -i "s/replacemysqlpassword/${MYSQL_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml echo ' Using filesystem-based attachments...' -- GitLab