Build and Deploys
Builds
Lynfera automatically performs a build every time you start a deployment in the UI
Build infrastructure
When you initiate a build, Lynfera creates a secure, isolated virtual environment for your project:
- Your code is built in a consistent, clean environment
- Build processes can't interfere with other users' applications
- Security is maintained through complete isolation
How builds are triggered
Builds can be initiated in the following ways:
- Dashboard deploy: Clicking Deploy in the dashboard or creating a new project triggers a build.
- Git push: Coming soon
Build customization
Commands like build command and the install command are initially set by Lynfera. You can override them depending on your framework in the project settings tab or while creating a new project.
- Build Command: Default build command (npm run build).
- Install Command: Default install command is npm install.
- Output Directory: Specify the folder containing your final build output (e.g., dist or build).
- Root Directory: Path Where your code is in your repo (e.g., / or /frontend) Default value: / . Your app will not be able to access files outside of that directory. You also cannot use .. to move up a level
Environment variables
Lynfera can automatically inject environment variables such as API keys, database connections, or feature flags during the build:
Lynfera injects your environment variables into the build process during install and build..
Build output and deployment
Once the build completes successfully:
- Lynfera uploads your build artifacts (static files, Lynfera Functions, and other assets) to the public cloud (s3).
- A unique deployment URL is generated (apart from the project link) (Both URLs can be used to access the deployment).
- Logs and build details are available in each project section of the dashboard.
If the build fails or times out, Lynfera provides diagnostic logs in the dashboard to help you troubleshoot. For common solutions, see our build troubleshooting docs.
Build duration
The total build duration is shown on the Lynfera deployment Dashboard and includes all three steps: checking, installing, building, checking, and uploading assets.
A Build can last for a maximum of 30 minutes. If the build exceeds this time, the deployment will be canceled and the error will be shown on the Deployment's page saying this message Failed to start build runner / Build timeout exceeded.
Lynfera enforces strict limits on build execution to ensure platform stability:
- Install Command: Max 10 minutes.
- Build Command: Max 15 minutes.
- Total Session: Max 30 minutes.
Limits and resources
Lynfera enforces certain limits to ensure reliable builds for all users:
- Build timeout: The maximum build time is 30 minutes. If your build exceeds this limit, it will be terminated, and the deployment fails.
- Concurrency: Max concurrent builds for each user is decided by their plan (free - 1, pro - 3).
- Container resources: We fairly give both sets of users (free, pro) container with a limit of 2 vCPUs and 2 GB RAM for now but these values may change in the future.
- Build image: Builds in Lynfera get a base image of Node:22-bookworm. You can view the generated image here
Deployments
A deployment on Lynfera is the result of a successful build of your project. Each time you deploy, Lynfera generates a unique URL to the live environment. The current project is also updated based on the deployment status.
Using the Dashboard
Lynfera's dashboard provides a centralized way to view, manage, and gain insights into your deployments.
When you select a deployment from your Project → Deployments tab, you can view each of the project’s deployments. Each deployment gives you insight into run time, logs, output files.
Files → Static Assets: Files (HTML, CSS, JS) and their sizes.
Managing Deployments
From the Deployments tab, you can:
- Inspect: View logs and build outputs.
- Promote to Production: Convert a preview deployment to production (if needed).
Environments
By default, Lynfera provide only a Production Enviroment.
- Inspect:View logs and build outputs.
- Promote to Production:Convert a preview deployment to production (if needed).
Delete a deployment.
By default Lynfera does not provide a deployment delete option.
However, you can delete a deployment by calling the API endpointhttps://api.lynfera.qzz.io/api/project/[id]/deployments via a DELETE method that accepts deployment deletion requests.
By default this changes project's current deployment to its previous one if current deployment is given to delete.
This action is strongly discouraged due to the risk of disrupting the active deployment. This can unintentionally change the active deployment or result in a failed deployment state.
Redeploy a project.
Redeployment can be done by the project dashboard via three dots → Create New Deployment.
Redeployment is required whenever environment variables are added, changed, or updated.
Promoting Deployments.
This is a method to manually chnage your project's current deployment to another old one without creating a new deployment
Promoting an older deployment may alter the currently active version of the project. Users may observe changes to the live site upon refresh.
To change a project deployment:
- Go to your project's Deployments tab
- Click the three dots.
- Select the option of promote deployment
You can't change the project to a failed deployment.
More Actions
- Subdomain: A new random Subdomain is given to project when it is created. You can change it before or after deployment to have your own custom subdomain.
- Disable/Enabling Project: Disabling project makes it not accessible to anyone. Accessing the project will display a project disabled page.
- Delete Project: Deleting project can be done via settings tab of project. This action permanently deletes the project.