Skip to content

Environment variables

Wassim Chegham edited this page Feb 2, 2023 · 2 revisions

For local development, the Contoso Real Estate application components require the following environment variables to be stored in a .env file in the root of each package:

  • ./packages/blog-cms/.env
  • ./packages/blog/.env
  • ./packages/api/.env

CMS application

Create a .env file in the root of the ./packages/blog-cms folder with the following content:

HOST=
PORT=
APP_KEYS=
API_TOKEN_SALT=
ADMIN_JWT_SECRET=
JWT_SECRET=
DATABASE_SSL=

STORAGE_ACCOUNT=
STORAGE_CONTAINER_NAME=
STORAGE_ACCOUNT_KEY=
STORAGE_URL=
STORAGE_CDN_URL=

DATABASE_HOST=
DATABASE_USERNAME=
DATABASE_PORT=
DATABASE_PASSWORD=
DATABASE_NAME=
DATABASE_SSL=

Blog application

Create a .env file in the root of the ./packages/blog folder with the following content:

NEXT_PUBLIC_STRAPI_API_URL="https://<name>.<random>.<region>.azurecontainerapps.io"

Portal API application

Create a .env file in the root of the ./packages/api folder with the following content:

# Database config
STRAPI_DATABASE_HOST=
STRAPI_DATABASE_USERNAME=
STRAPI_DATABASE_PORT=
STRAPI_DATABASE_PASSWORD=
STRAPI_DATABASE_NAME=
STRAPI_DATABASE_SSL=

# MongoDB config
DATABASE_CONNECTION_STRING=
DATABASE_NAME=