Capabilities
Lifecycle Workloads
Run automatically detected or Procfile-defined commands during deployment.
Use lifecycle processes to run commands before or after specific deployment phases.
Application Lifecycle Workloads
monolayer discovers lifecycle processes through framework automation or a root Procfile.
| Framework | Automatic Detection | Procfile |
|---|---|---|
| Next.js | ❌ | ✅ |
| React Router | ✅ Database creation and migration processes (only SSR) | ✅ |
| Vite single-page application (SPA) | ❌ | ❌ |
| FastAPI | ✅ Database creation and migration processes | ✅ |
Lifecycle Process Reference
bootstrap. Runs initialization or setup commands once when monolayer creates your application environment. Define this process in aProcfile.beforeRollout. Runs immediately before monolayer serves the new application version. Define this process in aProcfile.afterRollout. Runs after a successful application rollout. Define this process in aProcfile.createDatabase. Runs database creation commands once during the initial environment deployment. React Router and FastAPI can contribute this process automatically, or you can define it in aProcfile.migrateDatabase. Runs database schema migrations during every deployment before monolayer serves the new application version. React Router and FastAPI can contribute this process automatically, or you can define it in aProcfile.
For Procfile syntax and examples, see Procfile lifecycle processes.