DigitalOcean App Platform is a managed service that takes your code from Git and turns it into a running web application, database, or background worker, handling infrastructure, scaling, and deployments for you.

Here’s how it works in practice: You connect your GitHub or GitLab repository, choose a branch, and App Platform automatically detects your app’s language and framework. It then builds and deploys your app, providing a public URL.

Let’s say you have a simple Node.js app with an Express server. You push your code to a GitHub repository.

// server.js
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;

app.get('/', (req, res) => {
  res.send('Hello from DigitalOcean App Platform!');
});

app.listen(port, () => {
  console.log(`App listening on port ${port}`);
});

In your repository’s root, you’d also have a package.json file:

{
  "name": "my-do-app",
  "version": "1.0.0",
  "description": "",
  "main": "server.js",
  "scripts": {
    "start": "node server.js"
  },
  "dependencies": {
    "express": "^4.18.2"
  }
}

When you create an App on DigitalOcean, you’ll select "GitHub" as your source, authenticate, and pick your repository. App Platform will scan package.json and recognize it as a Node.js app. It will automatically set the build command to npm install and the run command to npm start.

You can also add databases. If you need a PostgreSQL database, you’d add a "Database" component to your App. App Platform provisions a managed PostgreSQL instance and injects connection details as environment variables into your application’s environment. Your Node.js app would then use these environment variables to connect.

The magic here is that you don’t have to manage servers, install Node.js, or configure networking. App Platform handles all of that. It provisions a Droplet (or multiple), installs the necessary runtime, sets up a load balancer, and ensures your app is accessible. When you push new code, it automatically rebuilds and redeploys.

You control scaling by adjusting the number of "App Instances" in the App Platform’s settings. Each instance is a separate container running your application. You can also configure resource allocation per instance (CPU, RAM).

The build process is also configurable. For example, if your app needs a npm ci instead of npm install for production builds, you can override the default build command in the App Platform’s settings. Similarly, if your start script is named differently, you’d update the run command.

A common misconception is that App Platform is just a fancy Heroku. While similar in concept, App Platform offers deeper integration with DigitalOcean’s ecosystem, including managed databases and Kubernetes, and often provides more predictable pricing. It’s designed to abstract away the operational burden of running web applications.

The exact environment variables injected for database connections are documented in the DigitalOcean control panel for that specific database. For example, a PostgreSQL database might provide DATABASE_URL which is a standard format like postgresql://user:password@host:port/database.

If you’re deploying an app that requires specific build-time environment variables, you’ll need to configure those within the App Platform’s "Environment Variables" section, marking them as "Build" rather than "Runtime" if necessary.

Once your app is deployed, you’ll receive a *.ondigitalocean.app URL. To use a custom domain, you’ll add a "Domain" resource to your App and update your DNS records to point to the DigitalOcean-provided CNAME.

The next step in optimizing your deployment is understanding how to leverage DigitalOcean’s Load Balancer and CDN integrations for performance and availability.

Want structured learning?

Take the full Digitalocean course →