This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cap staging maintenance:start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name fake.server; | |
access_log /var/log/nginx/fake.access.log; | |
error_log /var/log/nginx/fake.error.log; | |
# direct to maintenance if this file exists | |
if (-f $document_root/system/maintenance.html) { | |
rewrite ^(.*)$ /system/maintenance.html last; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# unicorn_rails -c config/unicorn.rb -E production -D | |
worker_processes 4 | |
user "synbioz", "users" | |
working_directory "/var/www/fake/current" | |
listen "/var/www/fake/shared/sockets/unicorn.sock", :backlog => 1024 | |
pid "/var/www/fake/shared/pids/unicorn.pid" | |
# nuke workers after 30 seconds instead of 60 seconds (the default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cap staging deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cap staging deploy:cold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle install --binstubs | |
$ bin/capify . | |
$ mkdir config/deploy | |
$ cp config/environments/production.rb config/environments/staging.rb | |
$ cap staging deploy:setup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'capistrano' | |
gem 'capistrano-ext' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :rails_env, "production" | |
role :web, "" | |
role :app, "" | |
role :db, "", :primary => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/capistrano" | |
# allowing shell interactions | |
default_run_options[:pty] = true | |
# multistaging | |
set :stages, %w(staging production) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="new_post" action="/articles" method="post"> | |
<input type="submit" formaction="/articles/preview" formmethod="get" value="Aperçu" /> | |
</form> | |
<input type="submit" form="new_post" value="Publier" /> |