This is a hands on guide to deploy a simple app using tsuru’s CLI app-deploy command.

Creating a app

To create an app, you need to use the command app-create:

$ tsuru app-create <app-name> <app-platform>

Deploying an app

To deploy your first app after choosing your <app-name> and <app-platform>, we can deploy It using this template:

$ tsuru app-deploy -a <app-name> <directory>

As a example we can deploy a tutorial app named hello world:

$ tsuru app-deploy -a helloworld .

With the command bellow we’ll be able to deploy our first app helloworld that is situated on the current directory (".").

Ignoring files and directories

To deploy smaller applications you are allowed to ignore files and/or directories using a file named .tsuruignore that needs to be on your app’s root directory. After using app-deploy, .tsuruignore will be read and each line will be considered a pattern to be ignored, so anything that matches a pattern will not be on your app after the deployment.

This is not mandatory while deploying your app, so If there’s no .tsuruignore on your app root directory, It’ll deploy your normally. This is a example of a .tsuruignore file:

<file name>.<file type>     // e.g.:
*.py                        // any named file of this type of file
app.*                       // any type of file with this name
dir*ry                      // anything that matches these pieces of name
dir/to/specific/path/<file name>.<file type>
relative/dir/*/to/path      // any directory that leads to <path>