LinuxCommandLibrary

dokku

Deploy and manage applications using Docker

TLDR

List running apps

$ dokku apps
copy

Create an app
$ dokku apps:create [app_name]
copy

Remove an app
$ dokku apps:destroy [app_name]
copy

Install plugin
$ dokku plugin:install [full_repo_url]
copy

Link database to an app
$ dokku [db]:link [db_name] [app_name]
copy

SYNOPSIS

dokku <command> [<args>]

Examples:
dokku apps:list
dokku config:set myapp DATABASE_URL=...
dokku logs myapp -t

PARAMETERS

apps:<subcommand>
    Manages applications (e.g., create, destroy, list).

config:<subcommand>
    Manages environment variables for applications.

logs <app>
    Displays application logs.

ps:<subcommand>
    Manages application processes (e.g., scale, restart, stop).

repo:<subcommand>
    Manages Git repositories for applications.

plugins:<subcommand>
    Manages Dokku plugins (e.g., install, list).

network:<subcommand>
    Configures container networking for applications.

storage:<subcommand>
    Manages persistent storage for applications.

domains:<subcommand>
    Manages custom domains for applications.

ssl:<subcommand>
    Manages SSL certificates for applications.

proxy:<subcommand>
    Configures application proxy settings.

DESCRIPTION

dokku is an open-source Platform as a Service (PaaS) that helps developers deploy and manage applications on a single server. Often referred to as a 'mini-Heroku', it leverages Docker to containerize applications and Git for deployments.

When an application's code is pushed to the dokku server via Git, dokku automatically detects the application's language or framework (using buildpacks, similar to Heroku, or by detecting a Dockerfile), builds it into a Docker image, and then runs it as a container. It simplifies the deployment workflow by abstracting away much of the underlying infrastructure management, allowing developers to focus on their code. It's ideal for small to medium-sized projects, personal applications, or internal tools where the simplicity of a PaaS is desired without the cost or vendor lock-in of a cloud provider.

CAVEATS

dokku is designed for single-server deployments, meaning it doesn't offer built-in high availability or clustering capabilities. While powerful for its niche, it requires some Linux server administration knowledge for initial setup and maintenance. Debugging deployment issues can sometimes be challenging, especially when dealing with complex buildpack interactions or Dockerfile specifics. It's not a direct replacement for large-scale, distributed PaaS solutions.

EXTENSIBLE PLUGIN ARCHITECTURE

A significant feature of dokku is its extensive plugin system. This allows users to add functionalities like database services (e.g., PostgreSQL, MySQL, Redis), persistent storage, specific proxy configurations, and more, extending the core capabilities of the platform. Plugins are often community-contributed and can be easily installed and managed via the dokku plugins commands.

BUILDPACK AND DOCKERFILE SUPPORT

dokku offers flexibility in how applications are built. It supports Heroku-compatible buildpacks, which automatically detect and build applications based on their language and framework. Alternatively, users can provide a custom Dockerfile in their repository, giving them granular control over the build process and the resulting Docker image.

HISTORY

dokku was initially created by Jeff Lindsay in 2013, aiming to provide a lightweight, self-hostable alternative to cloud-based PaaS offerings like Heroku. Its development closely followed the rise of Docker, utilizing Docker containers as its core deployment unit. Over the years, it has evolved into a robust and extensible platform, driven by a dedicated community, maintaining its focus on simplicity and ease of use for single-server application deployments. Its plugin architecture has allowed it to grow beyond basic application deployment to include database services, persistent storage, and more.

SEE ALSO

heroku(1), docker(1), git(1), caprover(1), coolify(1)

Copied to clipboard