Raff Apps

Set environment variable

Create or update one variable. By default the change rolls out to running replicas. Set redeploy: false to defer it to the next deploy.

A variable with scope of build or both is passed to the image build, so changing it triggers a rebuild rather than a restart.

put/api/v1/apps/services/{service_id}/env

Path parameters

service_idstring required

App service ID (UUID) or short id (the service_id field)

Request body

keystring required
valuestring required
is_secretboolean
scope'runtime' | 'build' | 'both'

Where the value is injected. Use build or both for values a framework inlines at build time (NEXT_PUBLIC_, VITE_, REACT_APP_, PUBLIC_); changing one rebuilds the image instead of restarting replicas.

redeployboolean

Response

Variable set

successboolean
deployment_idstring uuid

Changes