Avoid local mina/deploy.rb overwrite #2577

This commit is contained in:
Priit Tark 2015-07-20 18:52:19 +03:00
parent 5f32c1cfd4
commit 9e06e26c2e
5 changed files with 10 additions and 18 deletions

1
.gitignore vendored
View file

@ -9,6 +9,7 @@ capybara-*.html
/spec/tmp
**.orig
config/initializers/secret_token.rb
config/deploy.rb
config/secrets.yml
config/database.yml
/export

View file

@ -1,5 +1,6 @@
20.07.2015
* New syntax for setting webclient IP-s (see config/application-example.yml)
* Example mina/deploy.rb renamed to mina/deploy-example.rb in order to not overwrite local deploy scripts
14.07.2015

View file

@ -219,19 +219,6 @@ task deploy: :environment do
end
end
desc 'Rolls back the latest release'
task rollback: :environment do
queue! %(echo "-----> Rolling back to previous release for instance: #{domain}")
queue %(ls "#{deploy_to}/releases" -Art | sort | tail -n 2 | head -n 1)
queue! %(
ls -Art "#{deploy_to}/releases" | sort | tail -n 2 | head -n 1 |
xargs -I active ln -nfs "#{deploy_to}/releases/active" "#{deploy_to}/current"
)
to :launch do
invoke :restart
end
end
desc 'Loads current commit hash'
task load_commit_hash: :environment do
queue! %(

View file

@ -24,7 +24,8 @@ Deploy overview: (database schema should be loaded and seeds should be present)
git clone git@github.com:internetee/registry.git
cd registry
rbenv local 2.2.2 # more info about rbenv at debian doc
gem install mina
gem install mina # or any other deployment tool
cp config/deploy-example.rb config/deploy.rb # and edit it
mina pr setup # one time, only creates missing directories
ssh registry
@ -37,15 +38,17 @@ Deploy overview: (database schema should be loaded and seeds should be present)
vi /etc/apache2/sites-enabled/epp.conf # add epp conf, restart apache
exit
# at your local machine
mina pr deploy # this is command you use in every application code update
mina pr deploy # for new update using mina tool as example
### Deploy script setup
We recommend [Mina](https://github.com/mina-deploy/mina) instead of Capistrano for deployment.
We recommend [Mina](https://github.com/mina-deploy/mina) instead of Capistrano or other tools for deployment.
All deploy code locates at config/deploy.rb file.
All deploy code locates at config/deploy.rb, please copy content from example file and edit it.
cp config/deploy-example.rb config/deploy.rb # and edit it
First add shortcuts to your local machine ssh config file,

View file

@ -215,7 +215,7 @@ After deploy, in rails console:
Certificate.update_crl
Update cron:
Update cron (mina tool example, when installed correctly):
mina cron:setup