DevZero Logo
DevZero

Dokku

Dokku starter template for DevZero.

OPEN IN DEVZERO

What is Dokku?

Dokku is an open-source Platform as a Service (PaaS) solution that enables developers to deploy and manage applications on their own infrastructure. It serves as a lightweight and cost-effective alternative to cloud platforms like Heroku, offering the ability to deploy apps using Docker containers. Dokku’s extensibility, simplicity, and self-hosting capabilities make it a perfect fit for small to medium-sized teams. As an MIT-licensed platform, Dokku provides complete control over deployment processes while offering integration with various databases and services.

Features

  • Easy Deployment: Deploy applications by simply pushing code, and Dokku automatically builds and runs your app.
  • Docker-Based: Utilizes Docker containers for application portability and scalability.
  • Extensibility: Extend Dokku’s functionality by adding custom plugins and services.
  • Database Support: Supports popular databases such as PostgreSQL, MySQL, and Redis for integration.

Benefits

Dokku offers a simple, self-hosted platform that reduces deployment complexity while offering full control over infrastructure. It is an excellent solution for teams that need the flexibility to deploy applications quickly and consistently using Docker containers. By eliminating the need for third-party cloud providers, Dokku helps avoid vendor lock-in while offering cost-effective and customizable solutions for app deployment. Its open-source nature means you can tailor the platform to your team’s unique needs and workflows.

Dokku with DevZero

When used alongside DevZero, Dokku provides a self-hosted deployment environment that complements the ephemeral development setups of DevZero. By using Dokku, teams can deploy, scale, and manage their applications in a dynamic development environment, all while maintaining full control over their infrastructure.

Advantages

  • Integration with DevZero: Deploy and manage applications in DevZero's dynamic development environments.
  • Simplified Application Deployment: Take advantage of Docker containers for scalable and consistent app deployments.
  • Self-Hosting: Enjoy complete control over your deployment infrastructure without relying on third-party services.

Recipe for Dokku

Dokku

version: "3"
build:
  steps:
    - type: apt-get
      packages: ["build-essential", "curl", "git", "nano", "software-properties-common", "ssh", "sudo", "tar", "unzip", "vim", "wget", "zip", "docker-ce", "docker-ce-cli", "containerd.io"]
      extra_repositories:
        - key_url: https://download.docker.com/linux/ubuntu/gpg
          repository: https://download.docker.com/linux/ubuntu
    - type: command
      command: |
        usermod -aG docker devzero
        systemctl enable docker.service
        systemctl enable containerd.service
      directory: /home/devzero
      user: root

launch:
  steps:
    - type: command
      command: |-
          systemctl stop docker
          echo -e "{"data-root": "/home/devzero/docker"}" > /etc/docker/daemon.json
          systemctl start docker
      user: root

    - type: command
      command: |-
        docker pull dokku/dokku:0.35.5
        docker container run -d         --env DOKKU_HOSTNAME=dokku.me         --env DOKKU_HOST_ROOT=/var/lib/dokku/home/dokku         --env DOKKU_LIB_HOST_ROOT=/var/lib/dokku/var/lib/dokku         --name dokku         --publish 3022:22         --publish 8080:80         --publish 8443:443         --volume /var/lib/dokku:/mnt/dokku         --volume /var/run/docker.sock:/var/run/docker.sock         dokku/dokku:0.35.5

On this page