mahendar
Joined
Activity
Posted in BDD in a real project
@chris - can you please make this series!
Chris, what if there are validations on body column?
To deploy multiple Rails apps to the same server, you will need to replicate the capistrano settings for the second app, create another database, and change the default file in /etc/nginx/sites-enabled like the following:
server {
  listen 80;
  listen [::]:80 ipv6only=on;
  server_name domain1;
  passenger_enabled on;
  rails_env    production;
  root         /home/deploy/first_app/current/public;
  # redirect server error pages to the static page /50x.html
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root   html;
  }
}
server {
  listen 80 ;
  listen [::]:80;
  server_name domain2;
  passenger_enabled on;
  rails_env    production;
  root         /home/deploy/second_app/current/public;
  # redirect server error pages to the static page /50x.html
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
    root   html;
  }
}
Hope this helps someone. Many thanks Chris for this tutorial.