DEV Community

Cover image for Deploy a Docker App to Coolify in 5 Minutes
Lucas Neves Pereira
Lucas Neves Pereira

Posted on

1

Deploy a Docker App to Coolify in 5 Minutes

In this quick guide, we’ll walk through how to deploy a Docker application to Coolify in just five minutes. Coolify is a self-hosted platform that makes it easy to manage your applications with a user-friendly interface. Let’s get started!

Key Takeaways

  • Set up a Coolify project to manage your application.
  • Create a GitHub repository for your Dockerized app.
  • Build and deploy your application using a Dockerfile.
  • Access your app through a generated domain.

What Is Coolify?

Coolify is a platform that allows you to self-host applications easily. Think of it as your own version of Vercel, but with more control. You can deploy various applications, and it provides a clean UI to manage everything.

Setting Up Your Coolify Project

To begin, you need to have Coolify installed on your VPS. Once that’s done, follow these steps:

  1. Create a New Project: In the Coolify dashboard, create a new project. Let’s call it Coolify App.
  2. Connect Your GitHub Repository: You’ll need a GitHub repo to store your Dockerized application. Create a new repository named Coolify App as well.
  3. Link the Repository: Copy the GitHub URL and paste it into the Coolify dashboard to connect your project.

Creating Your Dockerized Application

Now that your project is set up, it’s time to create a simple Dockerized application. Here’s how:

  1. Clone Your GitHub Repository: Start by cloning the repository you just created.
  2. Set Up Your Application: Create a new package.json file and install Express. This will be the framework for your simple server.
  3. Here’s a quick example of what your index.js might look like:
  4. Create a .gitignore File: Don’t forget to add a .gitignore file to exclude node_modules from your repository.
  5. Create Your Dockerfile: This file tells Docker how to build your application. Here’s a simple Dockerfile:

Deploying to Coolify

With your application ready, it’s time to deploy:

  1. Push Your Code: Push your changes to the GitHub repository.
  2. Create a Deployment in Coolify: Back in the Coolify dashboard, create a new deployment. Coolify should automatically detect your Dockerfile.
  3. Monitor the Build Process: You can check the logs to see if the build is successful. Look for a message indicating that your app is running on port 3000.

Accessing Your Application

Once the deployment is complete, Coolify will generate a domain for your application. You can visit this domain to see your app in action. If everything went well, you should see the message you set up in your Express server.

Conclusion

And there you have it! In just five minutes, you’ve deployed a Dockerized application to Coolify. This platform makes it super easy to manage your apps without the hassle of complex setups. Give it a try, and see how it can simplify your development workflow!

Warp.dev image

Warp is the #1 coding agent.

Warp outperforms every other coding agent on the market, and gives you full control over which model you use. Get started now for free, or upgrade and unlock 2.5x AI credits on Warp's paid plans.

Download Warp

Top comments (0)

ITRS image

See What Users Experience in The Browser — Anywhere, Anytime

Simulate logins, checkouts, and payments on SaaS, APIs, and internal apps. Catch issues early, baseline web performance, and stay ahead of incidents. Easily record user journeys right from your browser.

Start Free Trial

👋 Kindness is contagious

Discover fresh viewpoints in this insightful post, supported by our vibrant DEV Community. Every developer’s experience matters—add your thoughts and help us grow together.

A simple “thank you” can uplift the author and spark new discussions—leave yours below!

On DEV, knowledge-sharing connects us and drives innovation. Found this useful? A quick note of appreciation makes a real impact.

Okay