Skip to main content

Auto-Provisioning

Makofy automatically provisions infrastructure when it detects your app needs it. No setup, no configuration — just deploy.

How it works

  1. During the build, Makofy scans your source code for environment variable references
  2. If a variable like DATABASE_URL is detected but not configured, Makofy provisions the resource
  3. The connection string or secret is automatically set as an encrypted environment variable
  4. On the next deploy, your app has everything it needs

Database (PostgreSQL)

When DATABASE_URL is detected in your code:

  • An isolated database is created on the shared PostgreSQL instance
  • A unique user is created with a random password
  • The user only has access to their own database
  • The connection string is set as DATABASE_URL

Format: postgres://app_myapp:randompass@postgres.makofy-system:5432/app_myapp?sslmode=disable

info

Each app gets its own database and user. Databases are not shared between apps, even within the same tenant.

Redis

When REDIS_URL is detected:

  • Your app is connected to the shared Redis instance
  • Connection string: redis://redis.makofy-system.svc.cluster.local:6379/0

Secrets

These variables are auto-generated with a 48-character random hex string:

  • JWT_SECRET
  • SESSION_SECRET
  • ENCRYPTION_KEY
  • ENCRYPTION_KEY_V1 / ENCRYPTION_KEY_V2
  • FILE_ENCRYPTION_KEY
  • BACKUP_ENCRYPTION_KEY
  • DOCUMENT_TOKEN_SECRET
  • EVAL_SECRET / EVAL_SESSION_SECRET
  • PASSWORD_PEPPER

NODE_ENV

When NODE_ENV is detected but not configured, it's automatically set to production.

Precedence

Auto-provisioning never overwrites manually configured values. If you've already set DATABASE_URL, Makofy won't touch it.

The check is:

  1. Is the variable detected in the source code?
  2. Is the variable already configured as an env var?
  3. If detected AND not configured → auto-provision