+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Script to run MobileFirst Server in container | startserver.sh

This script runs the MobileFirst Server image as a container on IBM® Containers on Bluemix®. Ensure that you have run the prepareserver.sh script to upload the image to the IBM Containers registry before running this script.

Table 1. Mandatory command line arguments
Command line argument Description
[-t|--tag] SERVER_IMAGE_TAG Name of the MobileFirst Server image.
[-n|--name] SERVER_CONTAINER_NAME Name of the MobileFirst Server container
[-i|--ip] SERVER_IP IP address that the MobileFirst Server container should be bound to. (We can provide an available public IP or request one using the cf ic ip request command.)

Usage example:

Table 2. Optional command line arguments
Command line argument Description
[-si|--services] SERVICE_INSTANCES Comma-separated Bluemix service instances that we want to bind to the container.
[-h|--http] EXPOSE_HTTP Expose HTTP Port. Accepted values are Y (default) or N.
[-s|--https] EXPOSE_HTTPS Expose HTTPS Port. Accepted values are Y (default) or N.
[-m|--memory] SERVER_MEM Assign a memory size limit to the container in megabytes (MB). Accepted values are 1024 MB (default) and 2048 MB.
[-se|--ssh] SSH_ENABLE Enable SSH for the container. Accepted values are Y (default) or N.
[-sk|--sshkey] SSH_KEY The SSH Key to be injected into the container. (Provide the contents of your id_rsa.pub file.)
[-tr|--trace] TRACE_SPEC The trace specification to be applied.

Default: *=info

[-ml|--maxlog] MAX_LOG_FILES The maximum number of log files to maintain before they are overwritten. The default is 5 files.
[-ms|--maxlogsize] MAX_LOG_FILE_SIZE The maximum size of a log file. The default size is 20 MB.
[-v|--volume] ENABLE_VOLUME Enable mounting volume for container logs. Accepted values are Y or N (default).
[-e|--env] MFPF_PROPERTIES Specify MobileFirst properties as comma-separated key:value pairs. Example: mfp.analytics.url:http://127.0.0.1/analytics-service/rest,mfp.analytics.console.url:http://127.0.0.1/analytics/console

Note: If you specify properties using this script, ensure that these same properties have not been set in the configuration files in the usr/config folder.

Parent topic: Script overview and usage