Application Management
New
Introduced in 0.3.1
apps:clone <old-app> <new-app> # Clones an app
apps:create <app> # Create a new app
apps:destroy <app> # Permanently destroy an app
apps:list # List your apps
apps:rename <old-app> <new-app> # Rename an app
apps:report [<app>] [<flag>] # Display report about an app
Usage
Listing Applications
New
Introduced in 0.8.1. Use the apps
command for older versions.
You can easily list all available applications using the apps:list
command:
Note that you can easily hide extra output from Dokku commands by using the --quiet
flag, which makes it easier to parse on the command-line.
Manually creating an application
A common pattern for deploying applications to Dokku is to configure an application before deploying it. You can do so via the apps:create
command:
Once created, you can configure the application as normal, and deploy the application whenever ready. This is useful for cases where you may wish to do any of the following kinds of tasks:
- configure domain names and ssl certificates
- create and link datastores
- set environment variables
Removing a deployed app
In some cases, you may need to destroy an application, whether it is because the application is temporary or because it was misconfigured. In these cases, you can use the apps:destroy
command. Performing any destructive actions in Dokku requires confirmation, and this command will ask for the name of the application being deleted before doing so.
Info
node-js-app
This will prompt you to verify the application's name before destroying it. You may also use the --force
flag to circumvent this verification process:
Destroying an application will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
Renaming a deployed app
New
Introduced in 0.4.7
You can rename a deployed app using the apps:rename
command. Note that the application must have been deployed at least once, or the rename will not complete successfully:
Destroying node-js-app (including all add-ons)
-----> Cleaning up...
-----> Building io-js-app from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Node.js app detected
-----> Creating runtime environment
...
=====> Application deployed:
http://io-js-app.ci.dokku.me
Renaming node-js-app to io-js-app... done
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
Cloning an existing app
New
Introduced in 0.8.1
You can clone an existing app using the apps:clone
command. Note that the application must have been deployed at least once, or the rename will not complete successfully:
This will copy all of your app's contents into a new app directory with the name of your choice and then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
Warning
If you have exposed specific ports via docker-options, added generic domains, or performed anything that cannot be done against multiple applications, apps:clone
may result in errors.
By default, Dokku will deploy this new application, though you can skip the deploy by using the --skip-deploy
flag:
Displaying reports about an app
New
Introduced in 0.8.1
You can get a report about the deployed apps using the apps:report
command:
You can run the command for a specific app also.
You can pass flags which will output only the value of the specific information you want. For example: