Secrets
Keep API keys, tokens and passwords out of your code: set them as Secrets, and your App gets them as environment variables.
A Secret is a value your App needs and nobody else should see. Basemodo keeps it encrypted, gives it to your App's processes as an environment variable, and never shows it again, not even to you: the list shows names, who set each, and when.
Setting one
basemodo env set STRIPE_KEY=sk_live_123 MAILER_TOKEN=abcAll the names in one command are set together, or none if one is wrong. To keep a value out of your shell's history, give the name alone and type or pipe the value:
basemodo env set STRIPE_KEY < stripe-key.txtYour App gets new or changed Secrets the next time it starts: the running version keeps the values it started with. Every start reads them again: a Deploy, waking from sleep, or a restart. So set them, then run basemodo restart (no build), or basemodo deploy.
In your code they are ordinary environment variables: process.env.STRIPE_KEY in Node, os.environ["STRIPE_KEY"] in Python.
Listing and removing
basemodo env listbasemodo env unset MAILER_TOKENenv list shows each name with who set it and when, and the latest changes. The App's page on basemodo.com has the same list and a form to set and unset them.
Rules
- Names are letters, digits and
_, not starting with a digit, at most 128 characters:STRIPE_KEY,db_password_2. PORTand every name starting withBASEMODO_are Basemodo's, set for every App (see How Apps run).- A value is at most 32 KB; an App has at most 100 Secrets.
- Everyone who may deploy an App may change its Secrets, and every change is recorded with who made it.