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

[FGA-47] Add environment variable overrides for cli environment configs #10

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

atainter
Copy link
Contributor

@atainter atainter commented Jul 29, 2024

Adds the following environment variable overrides for CLI environment configs.

Environment Variable Description Supported Values
WORKOS_ACTIVE_ENVIRONMENT Sets the selected environment in your .workos.json file. Use headless to override environment configs with other environment variable overrides.
WORKOS_ENVIRONMENTS_HEADLESS_NAME Sets the name of the environment
WORKOS_ENVIRONMENTS_HEADLESS_ENDPOINT Sets the base endpoint for the environment
WORKOS_ENVIRONMENTS_HEADLESS_API_KEY Sets the API key for the environment
WORKOS_ENVIRONMENTS_HEADLESS_TYPE Sets the env type for the environment Production / Sandbox

Developers can use these environment variables to set their active environment or override the existing environment.

Examples

Set the active environment

export WORKOS_ACTIVE_ENVIRONMENT=local

.workos.json

{
  "environments": {
    "local": {
      "endpoint": "http://localhost:8001",
      "apiKey": "<YOUR_KEY>",
      "type": "Sandbox",
      "name": "local"
    }
  }
}

Headless Mode

export WORKOS_ACTIVE_ENVIRONMENT=headless
export WORKOS_ENVIRONMENTS_HEADLESS_NAME=local
export WORKOS_ENVIRONMENTS_HEADLESS_ENDPOINT=http://localhost:8001/
export WORKOS_ENVIRONMENTS_HEADLESS_API_KEY=<YOUR_KEY>
export WORKOS_ENVIRONMENTS_HEADLESS_TYPE=Sandbox

FGA-47

Copy link

linear bot commented Jul 29, 2024

@atainter atainter merged commit 0f089f5 into main Jul 29, 2024
2 checks passed
@atainter atainter deleted the at-dockerize branch July 29, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants