My webMethods Server 10.7 | My webMethods Server Webhelp | Administering My webMethods Server | Startup and Configuration | Using My webMethods Server with Docker | Running and Customizing My webMethods Server Containers | About the My webMethods Server Environment Variables | Environment Variables that My webMethods Server Containers Support
 
Environment Variables that My webMethods Server Containers Support
My webMethods Server exposes the following environment variables for overriding the default configuration of an existing My webMethods Server image:
Variable
Description
DB_TYPE
The type of database used by the server instance. Valid values are:
*ms - Microsoft SQL Server
*oracle - Oracle
*db2 - DB2
*mysqlee - MySQL Enterprise Edition
*mysqlce - MySQL Community Edition
*postgresql - PostgreSQL
DB_URL
Database connection URL, based on the type of database and the driver. Enclose the database URL in double quotes when supplying the variable via the Docker command line.
DB_USERNAME
The user name to use when connecting to the My webMethods Server database.
DB_PASSWORD
The password of the My webMethods Server database user.
NODE_NAME
A custom name for the cluster node that hosts the server instance.
APPS_DIR
A directory on the container file system which contains the custom assets and applications to copy to the MWS/deploy directory of the My webMethods Server instance, and installed on container startup. If not specified, My webMethods Server uses the default SAGHOME/MWS/volumes/apps directory in the container. Assets and applications are sourced through a bind-mounted host directory, or an external volume, mounted to the apps directory location in the container. Valid asset formats are war, cdp, pdp, jar. For more information about deploying applications to a My webMethods Server Docker container, see Custom Applications in My webMethods Server Containers
CONFIGS_DIR
A directory on the container file system which contains miscellaneous configuration files that My webMethods Server loads on container startup. If not specified, the container startup script for My webMethods Server uses the default SAGHOME/MWS/volumes/configs and checks for a configs directory on the volume, mounted to the SAGHOME/MWS/volumes/configs directory on the container file system if such volume is available.
The configs directory on the mounted volume can contain one or more of the following subdirectories:
*assets_cfg - for supplying xmlImport files and My webMethods Server skins.
*cluster_cfg - stores custom configuration files for the My webMethods Server cluster, for example the cluster.xml file.
*instance_cfg - stores custom configuration files for the My webMethods Server instance, for example the mws.db.xml and server.properties files.
*jvm_cfg - for supplying custom JVM configuration files and certificates.
*profile_cfg - stores custom configuration files for the My webMethods Server OSGi profile, for example the custom_wrapper.conf file.
For more information about modifying the configuration of a My webMethods Server Docker container through an external volume, see Modifying the Configuration of a Container
DATA_DIR
Directory on the container file system to which My webMethods Server stores runtime data, such as search indexes and information about the deployed applications, and persists events from the Task Engine event queue. If not specified, My webMethods Server uses the default SAGHOME/MWS/volumes/data directory on the container file system.
LIBS_DIR
Directory on the container file system that holds third-party libraries or other custom jar files to be copied to the MWS/lib directory of the My webMethods Server instance and loaded by My webMethods Server on container startup. If not specified, the container startup script for My webMethods Server uses the default directory SAGHOME/MWS/volumes/libs on the container file system. Libraries and jars are sourced through a bind-mounted host directory or an external volume. For more information about using third-party libraries and custom jars in a My webMethods Server Docker container, see Using External Libraries in My webMethods Server Containers.
LOGS_DIR
Directory on the container file system to which My webMethods Server persists all log files, generated by the My webMethods Server instance. By default, the directory contains the following subdirectories:
*instance_logs - corresponds to the default SAGDir/MWS/server/instanceName/logs directory of an on-premise My webMethods Server installation.
*profile_logs - corresponds to the SAGDir/profiles/MWS_default/logs directory of an on-premise My webMethods Server installation.
*cli_logs - for all logs, stored in the SAGDir/MWS/bin directory of an on-premise installation. Logs for OSGi profile-related operations that My webMethods Server executes during operation, for example, when adding external libraries, are stored in cli_logs/archive.
If not specified, My webMethods Server uses the default directory SAGHOME/MWS/volumes/logs on the container file system.
Examples
*The following example starts a new My webMethods Server container based on the myMWSImage image and specifies a custom node name for the cluster node that corresponds to the My webMethods Server instance:
docker run --env NODE_NAME=myClusterNode myMWSImage
*The following example starts a new My webMethods Server container based on the myMWSImage image and overrides the default database connection parameters of the image:
docker run --env DB_TYPE=mysqlee --env DB_URL="jdbc:mysql://host:port;databaseName=wmdb;relaxAutoCommit=true"
--env DB_USERNAME=wmuser DB_PASSWORD=wmpass myMWSImage
At startup the My webMethods Server instance connects to a MySQL Enterprise Edition database with the name wmdb, on the specified host and port, using the credentials wmuser/wmpass, regardless of the default database configuration of the myMWSImage image.
*The following example starts a new My webMethods Server container based on the mws image, overrides the default database connection parameters for the image, and maps the default My webMethods Server connection port to an exposed container port:
docker run -e DB_URL="jdbc:wm:sqlserver://mwssql2016:1433;databaseName=mwsDB"
-e DB_USERNAME=wmuser -e DB_PASSWORD=wmpass -e DB_TYPE=ms -p 8585:8585 mws
At startup the My webMethods Server instance connects to a MS SQL Server database with the name mwsDB, on the host mwssql2016 and port 1433, using the credentials wmuser/wmpass, regardless of the default database configuration of the mws image. The My webMethods Server connection port 8585 is mapped to a port with the same number on the container host machine.
*The following example redirects the log file storage location for a My webMethods Server container based on the myMWSImage to the myLogs directory on the container file system, an persists all logs to the mounted directory MWSLogs on the host:
docker run -v /home/myDirs/MWSLogs:/volumes/myVolume/myLogs --env LOGS_DIR=/volumes/myVolume/myLogs myMWSImage