Environments
These pages use production hosts. Paths, headers, and request bodies are the same on every environment. Only the hostname changes.
| What | Production | Staging |
|---|---|---|
| Site, browse UI, Git HTTPS | https://amendable.io | https://stage.amendable.io |
| Sign up | amendable.io/sign-up | https://stage.amendable.io/sign-up |
| REST API | https://api.amendable.io | https://stage.api.amendable.io |
| OpenAPI UI | api.amendable.io/docs | https://stage.api.amendable.io/docs |
| Clone URL | https://amendable.io/r/<user>/<repo>.git | https://stage.amendable.io/r/<user>/<repo>.git |
| BYO S3 OIDC issuer | https://oidc.amendable.io | https://stage.oidc.amendable.io |
OIDC trust policies are hostname-specific. Copy issuer, audience, and subject from GET /v1/storage-buckets/oidc-setup on the environment you are calling.
Point the CLI at staging
Section titled “Point the CLI at staging”Defaults are production. Override with env vars or --staging:
export AMENDABLE_API_URL=https://stage.api.amendable.ioexport AMENDABLE_APP_URL=https://stage.amendable.ioamendable repo listamendable login --stagingamendable --staging repo listlogin --staging writes those hosts into ~/.config/amendable/config.toml.
api_url = "https://stage.api.amendable.io"app_url = "https://stage.amendable.io"Git credential helper for staging:
git config --global credential.https://stage.amendable.io.helper '!amendable git-credential'Point curl at another environment
Section titled “Point curl at another environment”export AMENDABLE_API_URL=https://stage.api.amendable.iocurl -sS "$AMENDABLE_API_URL/v1/account/usage" \ -H "access-token: $AMENDABLE_TOKEN"The CLI reads AMENDABLE_API_URL and AMENDABLE_APP_URL. Those override the config file.
Build these docs against staging
Section titled “Build these docs against staging”PUBLIC_DOCS_ENV=staging npm run buildThat rewrites production hostnames in the built site. The Markdown in git stays on production. Default PUBLIC_DOCS_ENV is production.