- Centralized Deployment Approach: Setup once
- History of Deployments: Who? When? What?
- Use Anywhere: Web Based
- Continuous Deployment (concept): trigger
cap deploywhen push/merge into the master branch.
Yes, those mostly valuable for the teams, but I believe single-man projects in some cases can also benefit from it.
Setup Strano for automatic deployments
Here is mostly typical for Strano installation except
which can be set through the
strano.yml as described below or environment
STRANO_BASE_URL='http://example.com/' bundle exec rails s
Clone from my fork:
git clone git://github.com/yevgenko/strano.git
cd strano git checkout -b push-deploy origin/push-deploy
cp config/database.example.yml config/database.yml
NOTE: example file contains settings for sqlite3 database, but I’d recommended you to go with mysql to eliminate some weird transaction issues.
cp config/strano.example.yml config/strano.yml
The following variables are mandatory for our setup:
# Strano's public SSH key with which it will attempt to clone Github repos via. public_ssh_key: MYPUBLICKEY # Strano's Github application client ID. See https://github.com/settings/applications github_key: github-application-client-id # Strano's Github application secret. See https://github.com/settings/applications github_secret: github-application-secret # Secret used to sign hook requests from GitHub. github_hook_secret: github-hook-secret # The application URL with a trailing slash, required for github hooks. # Can be passed as environment variable STRANO_BASE_URL='' # base_url: http://example.com/
Start the app:
bundle exec rails s
Or whatever you do to start your rails application on the server.
Start the worker:
bundle exec sidekiq
Usually it must be enough to have a Redis server up and running with default options.
That’s it! Once you sign-in with your GitHub account you will be able to start deploying your apps in no time.
Services that allows you to share localhost web servers to the rest of the world: