Deployments
A deployment runs a published version of your module on its own machines, behind a URL. Unlike a development preview, it does not require your editor or development machine to stay open.
A module can have multiple deployments, each with its own branch, startup script, environment variables, and resource settings. For example, you could keep separate staging and production deployments.
Before you deploy
- Test the application in development.
- Save, commit, and push the code to the module's repository.
- Decide which branch the deployment should use.
- Prepare the commands needed to install, build, and run the application from a clean checkout.
- Decide whether visitors need to sign in. Configure Authentication before making sensitive functionality available.
The builder uses a commit from the hosted Git repository. Unsaved edits, uncommitted files, and unpushed commits are not included. Installed dependencies, untracked build output, and local environment files from your dev machine do not carry over either.
Create and configure a deployment
- Open Deployments → New deployment in the module editor.
- Choose a descriptive name, such as
StagingorProduction. - Under Build and run, set the Branch and Startup script.
- Add the environment variables your application requires.
- Choose a machine size and scaling settings.
- Save changes, then select Deploy.
Saving configuration alone does not change the running application. Deploy or redeploy to apply changes to the code, startup script, environment variables, or resources.
Write a complete startup script
The startup script runs in the repository checkout on a fresh Linux environment. It must install dependencies, build the application if needed, and start a long-running HTTP server.
For a Node.js application with a lockfile and appropriate build and start scripts, this could be:
set -e
npm ci
npm run build
exec npm start
Adapt this to the application. set -e stops the script when a setup command fails. The final command must stay in the foreground; do not background the server with & and let the script exit.
The server must listen on 0.0.0.0 and $PORT, which is 8080 for deployments. Configure the application's code or start command to honour that value rather than a development-only port such as 3000 or 5173. Changing the PORT variable does not move the platform's route to another port.
The platform waits for the application to answer HTTP, then captures a deployment snapshot. Running machines restore that built state; scaling out does not repeat the installation process on each new machine. Keep setup repeatable, and do not rely on the startup script running once for every scaled instance. Avoid irreversible data migrations or other external side effects during a build unless you have designed them to run safely.
Configuration and persistent data
Deployment environment variables are available while the startup script runs and to the application it starts. They are separate from variables you exported in a development terminal. Never embed secret values into browser bundles or commit them to source control.
The module's project API credentials are also supplied to deployments; their permissions still apply. See Using project services.
Deployment machine filesystems are disposable and are not shared across instances. Use a project database for durable structured records and the Library for stored files. Do not use a deployment's local files as the only copy of user uploads, application records, or state that must survive a restart or redeploy.
Machine size and scaling
Choose the machine size that fits the application's resource needs. Larger builds and memory-intensive applications may need more capacity.
- Manual scaling keeps a configured number of machines.
- Automatic scaling adjusts the number within a minimum and maximum, using the configured request-concurrency target.
- A minimum of zero allows scale-to-zero. Consider the time needed to restore a machine when serving a request after inactivity.
Project quotas can limit available capacity. Check the project's Usage section and test the application's behaviour under realistic load. Multiple instances must not depend on private in-memory state in a single machine; use shared storage where required.
Check the result and logs
The deployment view shows its URL, source branch and commit, machine information, and status. Open the URL and test an actual user journey. A deployment record marked live is not by itself proof that every application route works.
Use the deployment's Logs tab to inspect build and runtime messages. If it fails to become ready, check for missing dependencies, a failing build, a server that exits, or a hardcoded listening port. If the deployed code looks old, confirm that you pushed the correct branch and redeployed it.
Custom domains
Add a hostname in the deployment's domains section. Intellectible provides the DNS records needed to verify ownership and route traffic; add those records with your DNS provider and use Check now to check progress.
Wait for verification and HTTPS provisioning, then test the domain. Removing a domain from Intellectible does not remove its DNS records at your provider. Review those separately if you stop using the hostname.
Update, stop, or delete
To publish an update, push the new commit, save any configuration changes, and select Redeploy. The deployment uses the selected branch's code at deployment time; later pushes do not automatically update it. Test again after redeploying.
Stop takes the deployment offline while retaining its configuration. Delete removes the deployment and its settings and releases its custom domains. Neither is a substitute for simply closing your editor: deployments have an independent lifecycle.