We will have three or four permanent hosting environments on cloud

  1. There will be dedicated branches in every project that will be mapped to these 3-4 environments
  2. For each environment, we will have a dedicated env file for storing the environment variable. There will be a global env file that will have all variables the app needs and the corresponding env files for each environment will override the variables that change between each environment.
Env Name Branch name Env file name
Local environment.ts
Develop develop develop.environment.ts
QA qa qa.environment.ts
Staging staging staging.environment.ts
Production master prod.environment.ts

Variables that are present in all web apps are -

  1. ENV_NAME: The name of the environment name. It should match the “Env Name” column in the above table
  2. ENV_VERSION: The version number of the app.
  3. DATABASE_CONNECTION_STRING: The API URL of the backend
  4. HOSTING_ROOT: The root URL on which the api client is hosted.
  5. SENTRY_DSN: The DSN of Sentry. More about in Art of Logging