Environment Variables
If things aren't working, check that these are correct for your environment. Contact codeowners for sensitive values.
List of environment variables
APP_MYSQL_DATABASE
Table name for MySQL database
APP_MYSQL_USERNAME
Username for MySQL database
APP_MYSQL_PASSWORD
Password for MySQL database
APP_MYSQL_HOST
Hostname for MySQL database
APP_MYSQL_PORT
Port number for MySQL database
APP_EMAIL_HOST
Hostname for email server used to send emails
APP_EMAIL_PORT
Port number for email server used to send emails
APP_EMAIL_USERNAME
Email address for email account used to send emails
APP_EMAIL_API_KEY
Key for SendGrid API used to send emails
APP_PUSHER_API_ID
ID for Pusher connection
APP_PUSHER_API_KEY
API Key for Pusher connection
APP_PUSHER_API_SECRET
Secret for Pusher connection
APP_PUSHER_API_CLUSTER
Cluster for Pusher connection
SHOPIFY_DOMAIN
Domain for our Shopify website
SHOPIFY_TOKEN
Token for Shopify Storefront API
IP address of our AWS EC2 server: 54.241.15.160.
How to set environment variables
The commands below show how to set environment variables for Windows and Mac/Unix for the example where APP_MYSQL_PASSWORD is set to password123.
Windows (using Command Prompt)
set ENV_VAR_NAME=env_var_value
set APP_MYSQL_PASSWORD=password123Windows (using Powershell)
Note the leading dollar sign and single quotes around the value.
$env:ENV_VAR_NAME = 'VALUE'
$env:APP_MYSQL_PASSWORD = 'password123'
Linux/MacOS
export ENV_VAR_NAME=env_var_value
export APP_MYSQL_PASSWORD=password123
Remember that setting environment variables only makes them available in that particular terminal window. If you open new windows, make sure to set them again.
To set an environment variable for the backend container (such as for debugging Loopback), modify your backend.env file in the deploy/dev/ folder. Then restart the entire docker-compose set of containers (see commands below, docker-compose stop and then docker-compose start).
Last updated