From 72755e14ad485f8da4f07e6e979ad3b63a05512b Mon Sep 17 00:00:00 2001 From: Vincent Massol <vincent@massol.net> Date: Sat, 25 Feb 2017 13:15:47 +0100 Subject: [PATCH] XDOCKER-11: Stop using Docker link feature (legacy/deprecated) * Use a better name for the property (thanks to Tianon) --- 9/mysql-tomcat/Dockerfile | 4 ++-- 9/mysql-tomcat/docker-compose.yml | 4 ++-- 9/mysql-tomcat/xwiki/docker-entrypoint.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/9/mysql-tomcat/Dockerfile b/9/mysql-tomcat/Dockerfile index c776d0f..48f3143 100644 --- a/9/mysql-tomcat/Dockerfile +++ b/9/mysql-tomcat/Dockerfile @@ -81,8 +81,8 @@ VOLUME /usr/local/xwiki # configure xwiki's hibernate.cfg.xml file. # - DB_DATABASE: the name of the database to use. Default is "xwiki". This is used to configure xwiki's # hibernate.cfg.xml file. -# - DB_CONTAINER: The name of the docker container containing the database. Default is "db". This is used to -# configure xwiki's hibernate.cfg.xml file. +# - DB_HOST: The name of the host (or docker container) containing the database. Default is "db". This is used to +# configure xwiki's hibernate.cfg.xml file. # Example: # docker run -it -e "DB_USER=xwiki" -e "DB_PASSWORD=xwiki" <imagename> diff --git a/9/mysql-tomcat/docker-compose.yml b/9/mysql-tomcat/docker-compose.yml index d29f367..6cf2f29 100644 --- a/9/mysql-tomcat/docker-compose.yml +++ b/9/mysql-tomcat/docker-compose.yml @@ -31,13 +31,13 @@ services: ports: - "8080:8080" # Default values defined in .env file. - # The DB_USER/DB_PASSWORD/DB_DATABASE/DB_CONTAINER variables are used in the hibernate.cfg.xml file. + # The DB_USER/DB_PASSWORD/DB_DATABASE/DB_HOST variables are used in the hibernate.cfg.xml file. environment: - XWIKI_VERSION=${XWIKI_VERSION} - DB_USER=${DB_USER} - DB_PASSWORD=${DB_PASSWORD} - DB_DATABASE=${DB_DATABASE} - - DB_CONTAINER=xwiki-mysql + - DB_HOST=xwiki-mysql # Provide a name instead of an auto-generated id for xwiki data (the permanent directory in included in it) # configured in the Dockerfile, to make it simpler to identify in 'docker volume ls'. volumes: diff --git a/9/mysql-tomcat/xwiki/docker-entrypoint.sh b/9/mysql-tomcat/xwiki/docker-entrypoint.sh index c918feb..753c104 100755 --- a/9/mysql-tomcat/xwiki/docker-entrypoint.sh +++ b/9/mysql-tomcat/xwiki/docker-entrypoint.sh @@ -49,7 +49,7 @@ function configure() { echo 'Configuring XWiki...' sed -i "s/replaceuser/${DB_USER:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml sed -i "s/replacepassword/${DB_PASSWORD:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml - sed -i "s/replacecontainer/${DB_CONTAINER:-db}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml + sed -i "s/replacecontainer/${DB_HOST:-db}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml sed -i "s/replacedatabase/${DB_DATABASE:-xwiki}/g" /usr/local/tomcat/webapps/ROOT/WEB-INF/hibernate.cfg.xml echo ' Using filesystem-based attachments...' -- GitLab