Configure Environment Variables for Docker
This topic describes the specific environment variables that a Docker-native deployment may use. You configure the Gateway for Docker by setting these environment variables in the docker-compose.yml file.
gateway93
This topic describes the specific environment variables that a Docker-native deployment may use. You configure the Gateway for Docker by setting these environment variables in the
docker-compose.yml
file. The
mysql-server
section of the docker-compose.yml
file is determined by your MySQL installation. To learn more about this, visit this page in the Docker documentation: https://hub.docker.com/r/mysql/mysql-server/Contents:
Using Non-Root MySQL User
When
SSG_DATABASE_USER
is not
root, the following mysql-server
environment variables must be provided, where:- MYSQL_RANDOM_ROOT_PASSWORDis set to "yes" as you are not using the root user.
- TheMYSQL_USER/MYSQL_PASSWORDmust match theSSG_DATABASE_USER/SSG_DATABASE_PASSWORDenvironment variables.
- TheMYSQL_DATABASEmust match theSSG_DATABASE_JDBC_URL's usage.
MYSQL_RANDOM_ROOT_PASSWORD, MYSQL_ROOT_PASSWORD, or MYSQL_ALLOW_EMPTY_PASSWORD(specifyMYSQL_USERMYSQL_PASSWORDMYSQL_DATABASE1, refer to MySQL document on which is appropriate for you)
Using Root MySQL User
When
SSG_DATABASE_USER
is
root, the following mysql-server
environment variables must be provided, where:- TheMYSQL_ROOT_PASSWORDmust match theSSG_DATABASE_PASSWORD.
- The SSG_DATABASE_USER must be "root".
- There isno needto provideMYSQL_RANDOM_ROOT_PASSWORD,MYSQL_USER,MYSQL_PASSWORD, andMYSQL_DATABASE.
MYSQL_ROOT_PASSWORD
MySQL Commands
In the sample
docker-compose.yml
file, the following are some of the commands for the mysql-service that can be tuned.command: - "--character-set-server=utf8" - "--innodb_log_buffer_size=32M" - "--innodb_log_file_size=80M" - "--max_allowed_packet=8M"