Create Full Stack loads environment variables from
.env files into
process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.
.env files are in their corresponding platform packages directories. For instance,
.env.local: Local overrides. This file is loaded for all environments except test.
.env.production: Environment-specific settings.
.env.production.local: Local overrides of environment-specific settings.
Files on the left have more priority than files on the right:
npm run build:
With Pulumi AWS
Pulumi stack configuration is in the
pulumi-aws package. For instance,
packages/pulumi-aws/Pulumi.production.yml. If Auth0 is included, Auth0 local development configuration is included in the Pulumi stack
Pulumi.development.yml since this exists in the cloud.
Pulumi stacks shouldn't be confused with
NODE_ENV of production tells CRA and Node to set various optimizations (ex. minification) relevant for running on a server.
NODE_ENV is used to determine which
.env files are loaded. Alternatively, Pulumi stacks can be seen as deployed environments (ex. production or staging). If you were to create a staging environment you'd have a
Pulumi.staging.yml which would also load