[Dokku] Command Cheatsheet

A quick reference guide for commonly used Dokku commands. 1. Create and list app # Create app dokku apps:create <app_name> # List app dokku apps:list 2. Set domains # Set app's domain dokku domains:set <app_name> app.example.com # Set global domain dokku domains:set-global example.com 3. Join app to a specific network # List all networks dokku network:list # Add an app to a specific network dokku network:set <app_name> initial-network <target_network> 4. Show the app’s configuration dokku config:show <app_name> 5. Manully restart an app dokku ps:rebuild <app_name> 6. Bind app container to all interface bind to all interfaces (0.0.0.0), so the container can be accessed by external request. However, the host port will be randomly assigned. ...

[Dokku] How to set up dokku to deploy docker image

About installing the dokku, I have written another post before: How to install Dokku with Portainer. So I will assume that you have Dokku installed in your server in this post. 1. Environment Setting Dokku: version: 0.27.5. HTTP port: 80, HTTPS port: 443, SSH port: 5022 IP of remote server where the Dokku is installed: 166.23.44.25 (example) Domain: example.com Name of App that will be deployed by Dokku: blog Port of App: 3000 2. SSH Configuration Generate ssh key public file id_rsa.pub ssh-keygen -o We will name the file as dokku_rsa, then you will see two files are generated: dokku_rsa and dokku_rsa.pub. ...

[Dokku] Network understanding

When I ran up Dokku container, I map the host port 8080 to Dokku container port 80. With this configuration, all external requests to Dokku have to reach the host port 8080 first and then they can reach the app deployed by Dokku. In Dokku container, Dokku server still listens to the port 80, 443, 22. Therefore, the port mapping from host to Dokku container looks like 8080:80 8443:443 5022:22 Again in Dokku container, the app’s nginx should listen to port 80. It’s because external requests will hit host port 8080, then will be converted to Dokku container port 80. Afterwards, Dokku app’s nginx can detect the requests and route them to the matching app according to the domain name. ...

[Dokku] How to install Dokku with Portainer

We can easily figure out how to set up Dokku by following the instructions on Dokku website. But for me, I like to host services in docker container as it will bring a clearer structure when it comes to host multiple services in a single machine. In this post, I will assume that you already had some idea about what Dokku is. If not, you can find more information here. In the title, I also mentioned another tool called Portainer. Basically it is a management tool of docker container and kubernete cluster with UI. But it is actually much more than that. (I feel I am digging a bit hole while introducing more and more tools). ...

DigitalOcean Referral Badge
Sign up to get $200, 60-day account credit !