VidulividuliBeta

The Blueprint: How We Build Your Code at Viduli

We listened to community feedback and updated our framework documentation to show you exactly how we build your code.

By Avin Kavish
DocumentationUpdates
Background
The Blueprint: How We Build Your Code at Viduli

We launched Viduli with minimal documentation regarding our build system and framework support. As a result, we saw that many users struggled to figure out exactly how to build their projects on the platform.

That wasn't the experience we wanted for you. So, we went back to work and created detailed documentation outlining exactly what goes into each build and how you can customize it.

You can read the full details in our new framework support docs.

The Build Formula

We’ve found that most builds follow a simple, repeatable formula. We have now documented the specifications for each build step, covering everything from the base image to the run commands.

Generally, the process looks like this:

  • Heuristics: We run heuristics on your code to identify specs, such as your specific node version.
  • Base & Install: We start with a base image, install necessary system libraries, and then install your project's dependencies.
  • Build & Optimize: We build the project and run framework-specific tasks, like generating static files.
  • Runtime Prep: For certain frameworks, we copy the build to a fresh runtime image
  • Security: We switch to a non-root user for security.
  • Execution: Finally, we set the run command, which is invoked by the container runtime once deployed.

Anatomy of a Build: NestJS

We designed our system to work seamlessly with the default configurations of each framework. To give you an idea of what that looks like under the hood, here is a simplified representation of our nestjs Dockerfile:

FROM node:detected-version

# Copy source code
COPY . .

# Install command
RUN npm ci

# Build command
RUN npm run build

# Switch to non-root user
USER node

# Expose the application port
EXPOSE 3000

ENV NODE_ENV=production

# Run command
CMD npm run start:prod

Note: The actual images contain further performance and security optimizations. Also, the node version is automatically detected from the .node-version file in your project directory.

Your Build, Your Way

While defaults are great for getting started, we know one size doesn't fit all. We've made the build process customizable, either when launching an Ignite app or later via the configuration tab.

The available options depend on the specific framework, but taking nestjs as an example again, you have full control to customize the install, build, and run commands, as well as the exposed port.

Conclusion

We think we have covered the majority of build scenarios for our supported frameworks with this update. However, we view this as a living system. We will continue to improve our build process and fix issues as they arise. We are looking forward to hearing your feedback on the new docs.

About Viduli

In case you haven't heard about Viduli, it's a new way to deploy your cloud projects without forcing you to become a DevOps expert. All the challenges of setting up and maintaining an enterprise-grade cloud environment is handled automatically by Viduli. You just have to bring your code and deploy.

Give it a go and let me know what you think!

Regards,

  • Avin, Founder

P.S. Subscribe below for more updates.

Join our newsletter

Get the latest updates and insights delivered to your inbox.