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_PASSWORD
     is set to "yes" as you are not using the root user.
  • The 
    MYSQL_USER
    /
    MYSQL_PASSWORD
     must match the 
    SSG_DATABASE_USER
    /
    SSG_DATABASE_PASSWORD
     environment variables.
  • The 
    MYSQL_DATABASE
     must match the 
    SSG_DATABASE_JDBC_URL
    's usage.
MYSQL_RANDOM_ROOT_PASSWORD, MYSQL_ROOT_PASSWORD, or MYSQL_ALLOW_EMPTY_PASSWORD
(specify
1
, refer to MySQL document on which is appropriate for you)
MYSQL_USER
MYSQL_PASSWORD
MYSQL_DATABASE
Using Root MySQL User
When
SSG_DATABASE_USER
is
root, the following
mysql-server
environment variables must be provided, where:
  • The 
    MYSQL_ROOT_PASSWORD
     must match the 
    SSG_DATABASE_PASSWORD.
  • The SSG_DATABASE_USER must be "
    root
    ".
  • There is 
    no need
     to provide 
    MYSQL_RANDOM_ROOT_PASSWORD
    MYSQL_USER
    MYSQL_PASSWORD
    , and 
    MYSQL_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"