diff --git a/9/mysql-tomcat/Dockerfile b/9/mysql-tomcat/Dockerfile index c776d0fa5f28173fffbda9ffd236c511b46df839..48f314331e3ed94f9ac3d3edafc458f891e5b1f7 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 d29f36731dec6f47e26f74811dc82e4518c43e3d..6cf2f2934130e0a63b973d403d4086358d5d8303 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 c918feb99f5bcdc7b11b29679757d502b1d1a667..753c1043373d2d5ceff1b8574e921a8227cb1b1e 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...'