Catalog / Deis v1 Cheatsheet

Deis v1 Cheatsheet

A comprehensive cheat sheet for Deis v1, covering essential commands for deploying, configuring, and managing applications.

Application Deployment

Basic Deployment

deis create <app-name> - Create a new application.
If app name is not specified, it is generated automatically.

Example:
deis create my-web-app

git push deis master - Deploy the application using Git.
This command assumes that the deis remote is properly configured.

Example:
Add remote:
git remote add deis deis@<deis-controller>:<app-name>
Then deploy:
git push deis master

deis open - Open the application in a web browser.

deis apps:info - Retrieve application information.

deis apps:list - List all applications.

deis apps:destroy - Delete the application.

Dockerfile Deployment

deis pull <image-name> - Deploy an application from a Docker image.

Example:
deis pull redis:latest

If a Dockerfile is present in the root directory, Deis automatically builds the application.

The default process type when using dockerfile is cmd.

Check the logs to see the result:
deis logs

Configuration Management

Configuration Variables

deis config:list - List all configuration variables.

deis config:set <KEY>=<VALUE> - Set a configuration variable.

Example:
deis config:set FOO=bar BAZ=foo

deis config:unset <KEY> - Unset a configuration variable.

Example:
deis config:unset FOO

deis config:pull - Pull configuration variables to a .env file.

deis config:push - Push configuration variables from a .env file.

deis env:set <KEY>=<VALUE> - Set environment variables(deprecated, use config:set instead)

Application Management

Instance Management

deis logs - View application logs.

deis run <command> - Run a one-off command in the application environment.

Example:
deis run rake db:migrate

deis ps - List the processes running in the application.

deis ps:scale <process-type>=<num> - Scale the number of instances for a process type.

Example:
deis ps:scale web=2

deis restart - Restart the application.

deis stop - Stop the application.

Domain Management

deis domains:list - List all custom domains for the application.

deis domains:add <domain> - Add a custom domain to the application.

Example:
deis domains:add www.myapp.com

deis domains:remove <domain> - Remove a custom domain from the application.

Example:
deis domains:remove www.myapp.com

Advanced Features

Resource Limits

deis limits:set <process-type>=<limit> - Set resource limits for a process type.

Example:
deis limits:set web=1G
deis limits:set web=1024 --cpu

Valid limit units are M (megabytes), G (gigabytes) for memory and --cpu flag for CPU shares.

deis limits:list - List current resource limits.

deis limits:unset <process-type> - Unset resource limits for a process type.

Collaboration

deis perms:create <username> - Grant permission to another user to manage the application.

Example:
deis perms:create otheruser

deis perms:list - List all users with permission to manage the application.

deis perms:delete <username> - Revoke permission from a user.

SSL Certificates

deis certs:add <cert-file> <key-file> - Add an SSL certificate to the application.

Example:
deis certs:add server.crt server.key

deis certs:list - List SSL certificates.

deis certs:remove - Remove SSL certificate.