Tutorial

Make It Easy for People to Try Your App with One-Click Deploy

Published on March 25, 2025
Make It Easy for People to Try Your App with One-Click Deploy

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 DigitalOcean’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 DigitalOcean account. 👉 GitHub Repo: do-one-click-deploy-flask

Flask Repo

Deploy Flask

Here’s What It Takes to Make Any Repo DigitalOcean Ready

Turning any GitHub repository into a One-Click Deployable App on DigitalOcean is surprisingly simple. You just need three things:

  1. Make sure your app is in a GitHub repo
  2. Add a simple YAML config file that tells DigitalOcean how to build and run it
  3. 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 DigitalOcean.

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 DigitalOcean know how to start your app when deploying.

Step 2: Add a requirements.txt File

You need to list all dependencies so DigitalOcean 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 DigitalOcean Deployment Template

Now, we create a deployment template that tells DigitalOcean 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 DigitalOcean:

  • 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 DigitalOcean’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 DigitalOcean’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 DigitalOcean’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 DigitalOcean:

## Deploy to DigitalOcean
[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/your-username/your-repo-name/tree/main)

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 DigitalOcean one-click deploy button"
git push origin main

And that’s it! 🎉

💡 Bonus: Add Your DigitalOcean Referral Code

Want to earn DigitalOcean credits when people deploy your app? You can add your referral code to your deploy link!

  • Sign up for DigitalOcean’s referral program here.
  • Find your referral code (it’ll look like refcode=your-code).
  • Modify your button’s link to include it:
## Deploy to DigitalOcean
[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/your-username/your-repo-name/tree/main&refcode=your-code)

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 DigitalOcean 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 DigitalOcean’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.

Further Reading

Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.

Learn more about our products

About the author(s)

Amit Jotwani
Amit Jotwani
See author profile
Category:
Tutorial

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
Leave a comment
Leave a comment...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.