Environment Variables
Environment variables are the primary way to configure your app. They are encrypted at rest and injected into your container at runtime.
Setting variables
From the dashboard
- Open your app
- Go to the Env tab or Settings tab
- Enter the key and value
- Click Save
From the API
curl -X PUT https://api.makofy.com/api/v1/apps/{appID}/env \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"vars": {"DATABASE_URL": "postgres://...", "NODE_ENV": "production"}}'
Detected variables
When you deploy, Makofy scans your source code for environment variable references:
| Language | Pattern detected |
|---|---|
| Node.js | process.env.VAR_NAME |
| Go | os.Getenv("VAR_NAME") |
| Python | os.getenv("VAR_NAME"), os.environ["VAR_NAME"] |
| Ruby | ENV["VAR_NAME"] |
Detected variables appear in the Env tab with a green DETECTED badge. Variables that appear in crash logs are highlighted in red.
Auto-provisioned variables
Makofy automatically provisions certain infrastructure when it detects your app needs it:
| Variable | What happens |
|---|---|
DATABASE_URL | An isolated Postgres database is created with a unique user and password |
REDIS_URL | Connected to the shared Redis instance |
JWT_SECRET | A random 48-character secret is generated |
SESSION_SECRET | A random 48-character secret is generated |
ENCRYPTION_KEY | A random 48-character secret is generated |
NODE_ENV | Set to production |
Auto-provisioned variables are marked with a purple AUTO badge in the dashboard.
info
Auto-provisioned values are only set if the variable is detected in your code AND not already configured. Your manual values always take precedence.
Security
- All values are encrypted at rest using AES-256-GCM
- Values are masked in the dashboard (shown as
••••••••) - Values are injected as Kubernetes secrets at deploy time
- Values are never logged or exposed in build output
Common variables
| Variable | Description |
|---|---|
PORT | The port your app listens on (default: 8080) |
NODE_ENV | Set to production for Node.js apps |
DATABASE_URL | PostgreSQL connection string |
REDIS_URL | Redis connection string |
JWT_SECRET | Secret key for JWT signing |