ConceptsEnvironment & env groups
Set variables
Set, remove and list the environment variables of a service.
Terminal
$ ferry env set api LOG_LEVEL=info 'DATABASE_URL=${{datastore.app-db.connectionString}}'Saved. Restarting 'api' with the new environment.Each service has its own environment variables. Ferry has no secret files: each setting is an environment variable.
Change the variables
ferry env set api LOG_LEVEL=info 'DATABASE_URL=${{datastore.app-db.connectionString}}'
ferry env unset api LOG_LEVEL
ferry env api # the service's own variables
ferry env ls api --effective # merged with its env groupsferry env set and ferry env unset restart the service. Thus the change applies.
- Add
--no-restartto only save. - Add
--followto see the restart.
Use single quotes around ${{…}}
Put a value that contains ${{…}} between single quotes. Then your shell does not change it.
You can also give variables when you create or upload a service: ferry create api -e KEY=VALUE or ferry up -e KEY=VALUE.