Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about build and runtime environments #9726

Merged
merged 3 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ In production, you can get environment variables to the Web Side either by
1. adding to `redwood.toml` via the `includeEnvironmentVariables` array, or
2. prefixing with `REDWOOD_ENV_`

Just like for the API Side, you'll also have to set them up with your provider.
Just like for the API Side, you'll also have to set them up with your provider. Some hosting providers distinguish between build and runtime environments for configuring environment variables.
Environment variables for the web side should in those cases be configured as build-time variables.

#### Option 1: includeEnvironmentVariables in redwood.toml

Expand Down Expand Up @@ -115,6 +116,7 @@ Navigating to http://localhost:8911/hello shows that the Function successfully a
<!-- Deployment system? platform? -->

Whichever platform you deploy to, they'll have some specific way of making environment variables available to the serverless environment where your Functions run. For example, if you deploy to Netlify, you set your environment variables in **Settings** > **Build & Deploy** > **Environment**. You'll just have to read your provider's documentation.
Some hosting providers distinguish between build and runtime environments for configuring environment variables. Environment variables for the api side should in those cases be configured as runtime variables.

## Keeping Sensitive Information Safe

Expand Down
4 changes: 3 additions & 1 deletion docs/versioned_docs/version-6.0/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ In production, you can get environment variables to the Web Side either by
1. adding to `redwood.toml` via the `includeEnvironmentVariables` array, or
2. prefixing with `REDWOOD_ENV_`

Just like for the API Side, you'll also have to set them up with your provider.
Just like for the API Side, you'll also have to set them up with your provider. Some hosting providers distinguish between build and runtime environments for configuring environment variables.
Environment variables for the web side should in those cases be configured as build-time variables.

#### Option 1: includeEnvironmentVariables in redwood.toml

Expand Down Expand Up @@ -115,6 +116,7 @@ Navigating to http://localhost:8911/hello shows that the Function successfully a
<!-- Deployment system? platform? -->

Whichever platform you deploy to, they'll have some specific way of making environment variables available to the serverless environment where your Functions run. For example, if you deploy to Netlify, you set your environment variables in **Settings** > **Build & Deploy** > **Environment**. You'll just have to read your provider's documentation.
Some hosting providers distinguish between build and runtime environments for configuring environment variables. Environment variables for the api side should in those cases be configured as runtime variables.

## Keeping Sensitive Information Safe

Expand Down
Loading