Easily Create Complex Stacks in Just a Few Clicks — New Release!

Tuomas

March 17, 2025

Read on Dev.to

Previously, we wrote about our IaC implementation, and today we are proud to announce its public release. Our new Stack Builder is out for anyone to try out! 🎉 Head over to diploi.com to have a go with it.

Here's a concise list of what this new update makes possible:

  • 🖱️ Pick 'n' choose style UI for creating tech stacks
  • 🔌 Zero-config deployments for even the most challenging of stacks
  • 🪄 Automatic monorepo generation & configuration
  • 🔥 Automatic image generation for optimized production deployments
  • 🔧 Access to Dockerfiles for each component for full customizability

These are in addition to what Diploi already offers, like our remote development environments with Cloud IDE & SSH support and automatic SSL generation to name a few.

Below is a deeper dive to some key highlights of this update. I'll also reveal a few behind the scenes details on how we implemented these features 😉, so keep reading if you are interested!


🏗️ Visual Stack Builder

Before this update, we supported a list of pre-made stacks with services that could not be easily swapped out for others. Like a template with Next.js and PostgreSQL could not be easily changed to include Redis for example. The most common feedback we received (by far) was the lack of support for the exact stack someone was familiar with and wanted to use. So we set out to fix this issue (and the solution had to be magical 🪄).

What we ended up implementing is a one of a kind tool for easily building the exact stack that your project needs while still remaining flexible once the project grows or changes in scope. Our Stack Builder combined with the IaC diploi.yaml file allows you to change infrastructure on the fly, and because the file is committed to Git, even maintain different infrastructure on different branches 🤯!

a selection of components with checkboxes, some are checked

A visual list of components that can be easily included in the stack.

 

Once you have picked your ideal stack, here's what our system does behind the scenes:

  • Creates a monorepo with boilerplate code for each component
  • Preconfigures GitHub actions to create optimized production builds
  • Generates HELM charts to set up environments with
  • Generates domains & SSL certificates for component endpoints

👀 We also implemented an embedded version of the full stack builder on our diploi.com homepage. You can launch a stack directly from it without even creating an account. Give it a try if you are interested!


📝 Infrastructure as Code (IaC)

I won't go into too much detail here, as you can check out the IaC implementation blog post that goes into great detail about our IaC implementation.

I do want to give an example of the diploi.yaml file here to give you an idea of what our Stack Builder actually generates as an output.

diploiVersion: v1.0
components:
  - name: Next.js
    identifier: next
    package: https://github.com/diploi/component-nextjs#v0.0.1
    env:
      include:
        - postgres.*
addons:
  - name: PostgreSQL
    identifier: postgres
    package: https://github.com/diploi/addon-postgres#v17.0
Enter fullscreen mode Exit fullscreen mode
An example Diploi config produced from the visual component picker.

 

This file is committed to your repository, and can be changed at any time. It makes managing your infrastructure as easy as installing an NPM package.


⚙️ GitHub Actions

While giving our users the freedom to edit their stacks the way they liked, we still wanted to give them the most optimized production environments possible, which means building optimized Docker images.

We wanted to use GitHub actions for this task as GitHub actions make it convenient to run CI/CD tasks (like building production ready images) right in the project repository, and a lot of developers like using them in their workflow.

We created two custom GitHub actions to make this as easy for the user as possible:

  • A "Define Components" action that reads the diploi.yaml file directly from the repository and builds a list of components that need to have images built
  • A "Build" action that configures and builds a single component

We then create a matrix step from the output of the Define Components action, which allows us to run the Build action for each of the components. This way we do not need to edit the GitHub actions file at all even when the components change!

the GitHub actions page with an example two-step action open

An example of our two GitHub actions working together to build all the component images for a single repository.

 

We allow customizing the Dockerfiles for each of these components directly inside of the project repository, so you can tweak these builds to your liking.

Both of these actions are actually open source, so check them out at our GitHub:
👉 diploi/action-components
👉 diploi/action-build


That's all we have for now! If you have any questions, feel free to leave a comment on this post 🙏.

And check out our new Stack Builder directly on diploi.com!

Get Started

Sign up using your GitHub account and receive 50 € in free credits to explore and experiment with. Development is about to get magical.

Sign Up