Objective
SOAJS uses environment variables when deploying services and daemons.
These environment variables define some basic settings for the service and the environment that the service should be deployed in so that SOAJS load the corresponding settings.
Environment Variables
The path of the profile is set using an environment variable on your machine.
Env Variable | Default Value | Availability | Description |
---|---|---|---|
SOAJS_PROFILE | /opt/soajs/node_modules/soajs.core.modules/profiles/single.js | Supported in all versions | Location of the profile to use so that SOAJS can connect to the core database. |
SOAJS_ENV | dev | Supported in all versions | The environment the service uses and registers itself under it upon start. |
SOAJS_SRVIP | Machine's IP address | Supported in all versions | Optional environment variable used to specify which IP address to use if the machine has more than one active interface. |
SOAJS_SOLO | false | Supported in all versions | Optional environment variable used to launch any service on top of SOAJS without the need of a database. |
SOAJS_SRV_AUTOREGISTERHOST | true | Supported in all versions | Optional environment variable used in case a service should register itself or not. |
SOAJS_DAEMON_GRP_CONF | N/A | Supported in all versions | Contains the name of the daemon group to use; available for daemons ONLY. |
SOAJS_GC_NAME | N/A | No longer supported in version 2.x and above | Mandatory variable if deploying a GCS service and contains the name of that GCS service. |
SOAJS_GC_VERSION | N/A | No longer supported in version 2.x and above | Mandatory variable if deploying a GCS service and contains the version of that GCS service. |
SOAJS_GC_MAX_UPLOAD_LIMIT | 2MB | No longer supported in version 2.x and above | Optional variable if deploying a GCS service that specifies the maximum upload limit of file sizes to accept. |
Add Comment