4.3. Configuring database for a docker container

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

eXo Platform community docker image supports both HSQL and MySQL databases. HSQL database is the default one for testing purposes. To move into production environment, it is highly recommended to connect the docker image to MySQL database.

For that purpose, you should specify some environment variables to the container startup command to make it work. The table below lists these needed variables:

VariableMandatoryDefault valueDescription
EXO_DB_TYPENohsqldbThe database type to be used, Community edition only supports hsqldb and mysql databases.
EXO_DB_HOSTNomysqlThe host to connect to the database server.
EXO_DB_PORTNo3306The port to connect to the database server.
EXO_DB_NAMENoexoThe name of the database / schema to use.
EXO_DB_USERNoexoThe username to connect to the database.
EXO_DB_PASSWORDYes The password to connect to the database.

An example of the execution command to use MySQL database for eXo Platform community docker image:

docker run -d \
    -p 8080:8080 \
    -e EXO_DB_TYPE="mysql" \
    -e EXO_DB_HOST="mysql.server-hostname.org" \
    -e EXO_DB_USER="exo" \
    -e EXO_DB_PASSWORD="my-secret-pw" \
    exoplatform/exo-community
	

For more details, you can look at this documentation.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus