-
Type:
Bug
-
Resolution: Not a bug
-
Priority:
Medium
-
None
-
Affects Version/s: master
-
Component/s: Environment - Docker
-
None
-
Severity 2 - Major
Issue Summary
Confluence docker was not able to start up by following the database configuration in https://hub.docker.com/r/atlassian/confluence-server. Keep getting Setup Database Failed error from UI.
Environment
- Confluence docker
Steps to Reproduce
docker run --name="confluence" -d \ -p 8090:8090 \ -p 8091:8091 \ -v ~/docker-home/confluence-home:/var/atlassian/application-data/confluence \ -e ATL_JDBC_URL=jdbc:postgresql://postgres.testnet:5432/confluence \ -e ATL_JDBC_USER=username \ -e ATL_JDBC_PASSWORD= \ -e ATL_DB_TYPE=postgresql \ --network testnet \ atlassian/confluence-server:latest
Expected Results
Avoiding the need to do the database setup through the UI.
Actual Results
Note
Here is the template of confluence.cfg.xml in /etc/atlassian/etc/confluence.cfg.xml.j2
{% if atl_jdbc_url is defined %}
{% set databases = {
"mysql": ["com.mysql.jdbc.Driver", "MySQLDialect"],
"postgresql": ["org.postgresql.Driver", "PostgreSQLDialect"],
"mssql": ["com.microsoft.sqlserver.jdbc.SQLServerDriver", "SQLServerDialect"],
"oracle12c": ["oracle.jdbc.driver.OracleDriver", "OracleDialect"]
} %}
<property name="confluence.database.choice">{{ atl_db_type }}</property>
<property name="hibernate.connection.url">{{ atl_jdbc_url }}</property>
<property name="hibernate.connection.username">{{ atl_jdbc_user }}</property>
<property name="hibernate.connection.password">{{ atl_jdbc_password }}</property>
<property name="hibernate.connection.driver_class">{{ databases[atl_db_type][0] }}</property>
<property name="hibernate.dialect">com.atlassian.confluence.impl.hibernate.dialect.{{ databases[atl_db_type][1] }}</property>
Workaround
- A password must be specified using the ATL_JDBC_PASSWORD environment variable