Stage and deployment environments
GoRules supports two environment types:Stage environments
Stage environments are hosted in GoRules. Deploying is instant, and your applications call the environment’s evaluate endpoint over HTTP - see Developer tools for endpoints and code samples.Deployment environments
Deployment environments push each release as a bundle to a deployment target - object storage that agents or embedded SDKs pull from and evaluate locally. Evaluation keeps working from the last pushed bundle even if GoRules is unreachable. Deployment targets are configured separately - see Deployments.The two types behave differently when a release is removed: stage environments serving it stop evaluating, while deployment environments keep their last pushed bundle and continue working until a new release is deployed.
Environment status
Each environment card on the Releases page shows the release it serves and its current state:
Cards also show how long ago the last deployment happened. When you’re deploying, an environment already serving the selected release is marked “already live”.
Create an environment
- Open project settings and go to Environments.
- Click New environment.
- Enter a name, such as “staging” or “production”, and a short key, such as “stg” or “prod”.
- Pick the type: Stage or Deployment. For a deployment environment, select an existing deployment target or create a new one by choosing a provider.
- Choose a deploy approval mode, and for Group Approval, select the approval groups.
Deploy approval modes
Approval modes control what happens when someone deploys a release to the environment:
Environments with an approval mode other than None show a “requires review” chip in the deploy view. Deploying to them opens a deploy request instead of deploying directly, and the release goes live once the request is approved. See Requests.
Use None for development environments where speed matters, and an approval mode for production so every change gets a second pair of eyes.
Evaluating against an environment
Every stage environment has its own evaluate endpoint. Point your application at the environment - not at a specific release - and deployments swap the rules behind the endpoint without any change on your side. Authenticate with a project access token; you can scope a token to a single environment so production credentials can’t evaluate anything else. See Developer tools for endpoints, tokens, and code samples.Older projects may still have a per-environment access token. These are deprecated - create a project access token scoped to the environment instead.