Table of Contents
URL: https://www.progressiverobot.com/one-click-deploy-button/
You don’t just build an app for yourself—you build them so people can use them. Whether it’s an open-source tool, a side project, or just something fun, the whole point of putting it out there is so others can try it, play with it, and maybe even improve on it.
But here’s the problem: a lot of good projects never get used because setting them up is too much work.
People land on your GitHub repo, think, *"Oh, this looks cool,"* but then they see a list of setup steps—clone this, install that, configure this—and they move on.
Adding a one-click deploy button fixes that. It lets people go from zero to one instantly—from reading about your app to actually running it in minutes. And it’s not just about making your life easier; it’s about making sure what you’ve built gets used.
One of the easiest ways to do this is the cloud provider’s One-Click Deploy button, which works for any app that can be deployed in the cloud—whether it’s a Flask API, a Next.js web app, a Ruby on Rails project, a Go service, a Node.js backend, or even a static site built with Hugo, Gatsby, or Jekyll. If your app runs on a server or a CDN, you can make it deployable in one click.
\> Want to see it in action? Here’s a Flask app repo with the One-Click Deploy button embedded in the README. You can hit the button to immediately deploy the app to your cloud account. 👉 GitHub Repo: do-one-click-deploy-flask
Here’s What It Takes to Make Any Repo the cloud provider Ready
Turning any GitHub repository into a One-Click Deployable App on the cloud provider is surprisingly simple. You just need three things:
- Make sure your app is in a GitHub repo
- Add a simple YAML config file that tells the cloud provider how to build and run it
- Add a deploy button to your README
Let’s go through a real example using a Flask app to show exactly how this works.
Let’s Say You Have This Simple Flask App…
To make this guide a bit more real and fun, let’s take a simple Flask app that fetches a joke from a public API (like the Chuck Norris API) and returns it as JSON.
Here’s our simple app.py:
from flask import Flask, jsonify
import requests
app = Flask(__name__)
@app.route("/")
def get_joke():
response = requests.get("https://api.chucknorris.io/jokes/random")
joke = response.json().get("value", "No joke found.")
return jsonify({"joke": joke})
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080)
What this app does:
- When you visit
/, it calls the Chuck Norris joke API. - Returns a random joke in JSON format.
- Runs on port 8080.
Now, let’s say you want to make it super easy for others to deploy and test this app.
Instead of making people clone, install dependencies, and set up Python locally, you want them to click a button and instantly deploy it to the cloud provider.
Here’s how you do it.
Step 1: Add a WSGI Entry Point
Create a new file called wsgi.py in your project directory:
from app import app
if __name__ == "__main__":
app.run()
This helps the cloud provider know how to start your app when deploying.
Step 2: Add a requirements.txt File
You need to list all dependencies so the cloud provider knows what to install.
Create a requirements.txt file:
flask==2.3.3
gunicorn==21.2.0
requests==2.31.0
This ensures your Flask app and requests library are installed in the deployment environment.
Step 3: Set Up a the cloud provider Deployment Template
Now, we create a deployment template that tells the cloud provider how to build and run the app.
1. Create a .do Directory
Run this command in your terminal:
mkdir -p .do
2. Create a deploy.template.yaml File
Inside .do, create a file called deploy.template.yaml and add:
spec:
name: chuck-norris-jokes
region: nyc
services:
- name: flask-web
environment_slug: python
git:
branch: main
repo_clone_url: https://github.com/your-username/your-repo-name
build_command: pip install -r requirements.txt
run_command: gunicorn --worker-tmp-dir /dev/shm wsgi:app
http_port: 8080
health_check:
http_path: /
instance_count: 1
instance_size_slug: apps-s-1vcpu-0.5gb
routes:
- path: /
envs:
- key: FLASK_ENV
value: production
scope: RUN_TIME
Note: 👉 Just make sure to replace your-username and your-repo-name with your actual GitHub repo details.
This file tells the cloud provider:
- How to build the app (
pip install -r requirements.txt) - How to start it (
gunicorn wsgi:app) - Where it runs (on port
8080) - Where to check if the app is healthy (a ping to
/) - What size server to use (
apps-s-1vcpu-0.5gb, which is the $5/month plan). You can see all available instance sizes and their pricing in the cloud provider's App Platform pricing guide. - How many instances to run (
1)
Note: This file might look a little unfamiliar if you haven’t seen one before, but it’s really just a version of the cloud provider’s regular app spec file. The main difference is that for the One-Click Deploy button to work, everything needs to go under a top-level spec: key in deploy.template.yaml file. If you're curious about what else you can include—like databases, static sites, alerts, or environment variables, check out the cloud provider’s Reference for App Specification.
Step 4: Add a One-Click Deploy Button
Now for the best part—the deploy button!
Adding this to your README.md lets anyone visiting your GitHub repo instantly launch your app on the cloud provider:
## Deploy to the cloud provider
[](https://www.progressiverobot.com/)
Note: Replace your-username and your-repo-name with your actual GitHub repo details.
Step 5: Push Your Changes
Commit and push your changes:
git add .
git commit -m "Add the cloud provider one-click deploy button"
git push origin main
And that’s it! 🎉
💡 Bonus: Add Your the cloud provider Referral Code
Want to earn the cloud provider credits when people deploy your app? You can add your referral code to your deploy link!
- Sign up for the cloud provider’s referral program Home – IT Consulting & Software Development.
- Find your referral code (it’ll look like
refcode=your-code). - Modify your button’s link to include it:
## Deploy to the cloud provider
[](https://www.progressiverobot.com/)
Note: Replace your-username and your-repo-name with your actual GitHub repo details.
Now, whenever someone deploys your app using your button, they sign up through your referral link, and you earn credits toward your the cloud provider usage.
Easy for them, free hosting for you. Win-win!
What Will You One-Click Deploy?
Most people won’t set something up if it takes too much effort. Not because they don’t care, but because they have other things to do.
That’s where the cloud provider’s One-Click Deploy button comes in. Instead of making people follow a bunch of setup steps, they can just click a button and try your app right away.
If your project runs in the cloud—whether it’s Flask, Node.js, Rails, Django, Go, or even a static site—you can make it deployable in one click.
So save everyone some time, including yourself. Add a One-Click Deploy button, and make it easy for people to try your app.