Separate application management docs

Also add complete documentation around all the commands in the apps plugin.
This commit is contained in:
Jose Diaz-Gonzalez
2016-07-05 01:11:18 -04:00
parent f623a0a8bf
commit 29847b7ab6
3 changed files with 119 additions and 30 deletions

View File

@@ -85,36 +85,6 @@ When the deploy finishes, the application's URL will be shown as seen above.
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks) or using a project's [dockerfile](https://docs.docker.com/reference/builder/).
### Removing a deployed app
You can also remove an application from your Dokku installation. This 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).
```shell
# on your dokku host
# replace APP with the name of your application
dokku apps:destroy 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:
```shell
# on your dokku host
# replace APP with the name of your application
dokku --force apps:destroy APP
```
### Renaming a deployed app
> New as of 0.4.7
You can rename a deployed app using the `apps:rename` CLI tool:
```shell
# on your dokku host
dokku apps:rename OLD_NAME NEW_NAME
```
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.
### Deploying non-master branch
@@ -208,6 +178,14 @@ See the [buildpack documentation](/dokku/deployment/buildpacks/).
See the [image tagging documentation](/dokku/deployment/images/).
## Removing a deployed app
See the [application management documentation](/dokku/deployment/application-management/#removing-a-deployed-app).
### Renaming a deployed app
See the [application management documentation](/dokku/deployment/application-management/#renaming-a-deployed-app).
## Zero downtime deploy
See the [zero-downtime deploy documentation](/dokku/deployment/zero-downtime-deploys/).

View File

@@ -0,0 +1,110 @@
# Application Management
> New as of 0.3.1
```
apps # List your apps
apps:create <app> # Create a new app
apps:destroy <app> # Permanently destroy an app
apps:rename <old-app> <new-app> # Rename an app
```
You can easily list all available applications using the `apps` command:
```shell
dokku apps
```
```
=====> My Apps
node-js-sample
python-sample
```
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.
```shell
dokku --quiet apps
```
```
node-js-sample
python-sample
```
## 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:
```shell
dokku apps:create node-js-app
```
```
Creating node-js-app... done
```
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.
```shell
dokku apps:destroy node-js-app
```
```
! WARNING: Potentially Destructive Action
! This command will destroy node-js-app (including all add-ons).
! To proceed, type "node-js-app"
> node-js-app
Destroying node-js-app (including all add-ons)
```
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:
```shell
dokku --force apps:destroy node-js-app
```
```
Destroying node-js-app (including all add-ons)
```
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 as of 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:
```shell
dokku apps:rename node-js-app io-js-app
```
```
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.

View File

@@ -134,6 +134,7 @@
<a href="/{{NAME}}/deployment/buildpacks/" class="list-group-item">Buildpack Deployment</a>
<a href="/{{NAME}}/deployment/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
<a href="/{{NAME}}/deployment/images/" class="list-group-item">Image Tagging</a>
<a href="/{{NAME}}/deployment/application-management/" class="list-group-item">Application Management</a>
<a href="/{{NAME}}/deployment/remote-commands/" class="list-group-item">Remote Commands</a>
<a href="/{{NAME}}/deployment/one-off-processes/" class="list-group-item">One Off Processes/Cron</a>
<a href="/{{NAME}}/deployment/process-management/" class="list-group-item">Scaling Apps</a>