Efficient deployment pipelines are significant for delivering software features swiftly and smoothly. We have experimented with several tools and methods to address the challenges and streamline the deployment processes. Recently, we implemented Coolify, a self-hosted platform that has remarkably simplified our deployment workflows. This blog details our journey from implementing Coolify to experiencing how it simplifies our deployment workflows and enhances our overall development lifecycle.
What is Coolify?
Coolify is an open-source, self-hostable platform that merges the flexibility of cloud services with direct control over managing servers, applications, and databases on your own hardware. It allows you to manage everything through a simple SSH connection. It serves as an alternative to platforms like Heroku, Netlify, and Vercel, but without the vendor lock-in. This ensures that all configurations for your applications and databases are saved on your server, allowing you to manage your resources even if you stop using Coolify. It supports managing various types of hardware, including VPS, Bare Metal, and Raspberry PIs.
Why Coolify?
Before Coolify, our deployment pipeline primarily relied on GitHub Actions and Jenkins. While these tools are powerful and flexible, they require significant time and effort to set up and maintain. We had to create and manage numerous pipelines, configure DNS settings manually, and handle environment-specific deployments. This often led to delays and a higher potential for human error.
Coolify presented itself as an elegant solution to these challenges. It promised to streamline our deployment process, reduce the need for manual configurations, and provide an intuitive interface for managing multiple environments.
Setting Up Coolify
We ensured we had a registered domain with Cloudflare, a remote server from Hetzner that supports SSH access, a prepared Git repository for our app, and optionally created an SSH key for secure server access. This is to enhance our security when accessing the server.
Set Up Our Server on Hetzner
We selected a server location close to our user base. Here’s a brief overview of our server configuration:
Operating System: Ubuntu 22.04
Memory: 8GB RAM
Storage: 100GB SSD
CPU: 4 Cores
Using the IP address provided by Hetzner, we connected to the server via SSH using the following command.
Installing Coolify
We installed Coolify on our server with the following command:
The process was straightforward, allowing us to get Coolify up and running quickly.
Accessing and Configuring Coolify
We opened the provided IP address, ported it to our browser, and registered with a strong, unique password. We set up the server by selecting “localhost” and followed the prompts to create and configure our project. To integrate our GitHub repositories with Coolify, we configured the Coolify GitHub app as the source. This setup allowed us to manage different environments for each project effortlessly. It ensured a robust and efficient deployment pipeline, covering development, staging, and production environments.
Configuring Cloudflare
We set the SSL/TLS mode to “Full (strict)” to avoid redirect loops and added an A record in Cloudflare’s DNS management, pointing to our Hetzner server IP for the subdomain.
Finalizing Coolify Configuration
In Coolify settings, we set the instance’s domain to https://coolify.our_domain and redeployed the project to apply the domain changes.
Redirecting WWW to Non-WWW
We created A and AAAA records for the www subdomain in Cloudflare, pointing to dummy IPs. Then, we set up a redirect rule to direct www traffic to the root domain. With these steps completed, we successfully set up a self-hosted PaaS using Coolify and configured our domain.
Benefits of Using Coolify
Using Coolify has significantly streamlined our deployment process, providing us with numerous benefits.
Reduced Time Spent on DevOps
One of the most significant advantages of using Coolify is that it reduces the time spent on DevOps tasks. Previously, setting up deployment pipelines with GitHub Actions and Jenkins required considerable effort. We connected our GitHub repositories and set up the necessary environments for each project. Coolify’s integration with GitHub made managing our source code and deployment processes easy from a single platform. Its intuitive interface and automation capabilities have significantly reduced the time and effort required for managing deployments.
Simplified DNS Configuration
Configuring DNS settings manually was a tedious task. We used to set up custom domains by manually setting A records on Cloudflare and configuring NGINX. Coolify has simplified this process by handling DNS configurations automatically. This not only saves time but also reduces the potential for configuration errors.
Automatic PR Builds
Coolify’s automatic PR (Pull Request) build feature has been a game-changer for our QA and integration testing processes. When a PR is created, Coolify automatically generates a version of the app with the PR branch and shares a link. This makes it easier for our QA team to test new features and for developers to ensure integration without affecting the main branch.
Empowered Development Teams
With Coolify, we can assign teams and projects, allowing developers to deploy their applications independently. This has empowered our development teams, increasing productivity and reducing bottlenecks.
Managing Environments
Coolify’s environment management capabilities have been particularly beneficial. We can easily create and manage development, staging, and production environments for each project. This has ensured that our deployment processes are consistent and reliable across different stages of development. The ability to manage multiple environments from a single interface has simplified our workflow and reduced the chances of environment-specific issues.
Our experience with Coolify has been transformative, streamlining our deployment processes, reducing manual configurations, and empowering our development teams. By automating many DevOps tasks, Coolify allows us to focus more on innovation and less on managing pipelines. Its user-friendly interface, powerful features, and seamless GitHub integration make it an excellent choice for simplifying deployment workflows and enhancing development processes.