Scalingo Deployment
This page documents deployments using dpl v1 which is currently the legacy version. The dpl v2 is released, and we recommend useig it. Please see our blog post for details. dpl v2 documentation can be found here.
Travis CI can automatically deploy your application to Scalingo application after a successful build.
Chose one of two ways to connect to your Scalingo account:
- Using a username and password.
- Using an api key.
Connect with Username and Password #
Add your Scalingo username and your encrypted
Scalingo password to your .travis.yml
:
deploy:
provider: scalingo
user: "<Your username>"
password:
secure: "YOUR ENCRYPTED PASSWORD"
Connect with an API key #
Add your encrypted
Scalingo api_key
to your .travis.yml
:
deploy:
provider: scalingo
api_key:
secure: "YOUR ENCRYPTED PASSWORD"
Optional Settings #
remote
: Remote url or git remote name of your git repository. The default remote name is “scalingo”.branch
: Branch of your git repository to deploy. The default branch name is “master”.app
: Only necessary if your repository does not contain the appropriate remote. Specifying theapp
will add a remote to your local repository:git remote add <remote> git@scalingo.com:<app>.git
Run Commands Before or After Deploy #
Sometimes you want to run commands before or after deploying. You can use
the before_deploy
and after_deploy
stages for this. These will only be
triggered if Travis CI is actually deploying.
before_deploy: "echo 'ready?'"
deploy:
..
after_deploy:
- ./after_deploy_1.sh
- ./after_deploy_2.sh