# .env
PEM_DIRECTORY=
REPO_URL=
APP_NAME=
STAGING_DEPLOY_DIRECTORY=
STAGING_SERVER_IP=
STAGING_SERVER_USER=
# Double check requirement of these for variables below in the staging environment .env file
STAGING_DB_DATABASE=
STAGING_DB_USERNAME=
STAGING_DB_PASSWORD=
STAGING_SECRET_KEY_BASE=
# not sure if the last STAGING_SECRET_KEY_BASE can be dealt by rails credentials rather than here.
ii. Define staging environment for Webpacker — Rails 6 also requires setting environment for webpacker.
You need to add staging section in config/webpacker.yml file.
You can simply copy the production block from the same file and edit for staging.
Also you need to create config/webpack/staging.js file.
You can copy the contents from config/webpack/production.js into staging.js file.