Deployment / Edits
Edited line 132 :
Edited line 132 :
Edited line 136 :
Edited line 138 :
Edited line 169 :
Edited line 12 :
Phusion Passenger.
See separate page for Phusion Passenger. In 2.0 it supports Rack-based frameworks so you can use it with Merb.
Edited line 171 :
If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = '/prefix' within the Merb::Config.use do |c| block.
If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Edited line 5 :
Edited line 5 :
Edited line 156 :
Edited line 24 :
merb -e production -c 4 --port 9000will start four Mongrels on ports 9000, 9001, 9002 and 9003 in production mode.
merb -c 4 --port 9000will start four Mongrels on ports 9000, 9001, 9002 and 9003.
Edited line 39 :
Edited line 44 :
Edited line 108 :
Edited line 39 :
Edited line 29 :
# config/deploy.rb
# config/deploy.rb
Edited line 52 :
Edited line 7 :
Edited line 24 :
We should discuss: http://github.com/eldiablo/merb-manage/tree/master
Edited line 24 :
We should discuss: http://github.com/eldiablo/merb-manage/tree/master
Edited line 53 :
Using Nginx
Configuring Nginx
Edited line 72 :
Once Nginx has been installed, the configuration for the merb application needs to be applied.
Configuring Nginx
This has been split up into the general configuration and the specific virtual host for the application. First, the general configuration as shown below:
Once Nginx has been installed, the configuration for the merb application needs to be applied. This has been split up into the general configuration and the specific virtual host for the application. First, the general configuration as shown below:
Edited line 59 :
In Debian
In debian
Edited line 67 :
Make sure you have the community repo configured in your /etc/pacman.conf
/etc/pacman.conf
Edited line 56 :
Install Nginx
h3.Install Nginx
Edited line 56 :
h3.Install Nginx
Install Nginx
Edited line 59 :
In debian
In debian
Edited line 64 :
In Archlinux
In Archlinux
Edited line 23 :
merb -c 4 --port 9000will start four Mongrels on ports 9000, 9001, 9002 and 9003.
merb -c 4 --port 9000 will start four Mongrels on ports 9000, 9001, 9002 and 9003.
Edited line 25 :
Edited line 59 :
In debian
Edited line 60 :
In Archlinux
Make sure you have the community repo configured in your/etc/pacman.conf
pacman -S nginx
Edited line 6 :
Edited line 8 :
Actually explains deployment quite well. I would love to extract the important pieces from each article onto this page. I might do it if I check back and no one as added to this.
Starter guide for getting configured on Fedora 8 – Updated 4/13/08
Edited line 65 :
$ sudo apt-get install nginx
$ sudo apt-get install nginx
Edited line 64 :
$ sudo apt-get install nginx
Edited line 65 :
Once Nginx has been installed, the configuration for the merb application needs to be applied. This has been split up into the general configuration and the specific virtual host for the application. First, the general configuration as shown below:
Edit the Nginx Configuration File:
Edited line 106 :
and then the specific virtual configuration file:
and then in the virtual configuration:
Edited line 109 :
# /etc/nginx/conf/vhosts/app.conf
Edited line 105 :
and then in the virtual configuration:
server {
listen xx.xx.xxx.xx:80;
client_max_body_size 50M;
server_name xx.xx.xxx.xx;
root /path/to/app/current;
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect false;
proxy_max_temp_file_size 0;
if (-f $request_filename) {
break;
}
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}
if (!-f $request_filename) {
proxy_pass http://polling_server;
break;
} }
error_page 500 502 503 504 /500.html;
location = /500.html {
root /path/to/app/current;
}
}
Edited line 68 :
# /etc/nginx/nginx.conf
# /etc/nginx/nginx.conf
Edited line 105 :
Edited line 58 :
Configuring Nginx
Install Nginx
Edit the Nginx Configuration File:
# /etc/nginx/nginx.conf
user www-data www-data; #chowned this user/group
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
upstream polling_server {
server 127.0.0.1:4000;
server 127.0.0.1:4001;
server 127.0.0.1:4002;
server 127.0.0.1:4003;
}
# virtual configs
include /etc/nginx/conf/vhosts/app.conf;
}
Edited line 38 :
Edited line 44 :
Edited line 44 :
Edited line 38 :
Edited line 43 :
Edited line 34 :
Edited line 36 :
Edited line 41 :
Edited line 43 :
Edited line 28 :
merb -c 4 --port 9000 will start four Mongrels on ports 9000, 9001, 9002 and 9003.
merb -c 4 --port 9000 will start four Mongrels on ports 9000, 9001, 9002 and 9003. You can use -a to direct Merb to use a different application server: merb -a thin -c 4 --port 9000
Edited line 21 :
Edited line 25 :
Configuring for a shared host
If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Edited line 57 :
Configuring for a shared host
If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Edited line 34 :
merb -c 4 --port 9000 will start four Mongrels on ports 9000, 9001, 9002 and 9003. You can use -a to direct Merb to use a different application server: merb -a thin -c 4 --port 9000
merb -c 4 --port 9000 will start four Mongrels on ports 9000, 9001, 9002 and 9003. You can direct Merb to use a different application server with -a: merb -a thin -c 4 --port 9000
Edited line 37 :
This can be done programatically with Capistrano:
This can be done programatically with Capistrano
Edited line 42 :
Edited line 55 :
Edited line 50 :
Edited line 21 :
Edited line 34 :
This can be done programatically with Capistrano
# config/deploy.rb
namespace :deploy do
desc 'Custom restart task for Merb'
task :restart, :roles => :app do
deploy.stop
deploy.start
end
desc 'Custom start task for Merb'
task :start, :roles => :app do
invoke_command "merb -c 4 --port 9000 --log #{shared_path}/log/production.log --merb-root #{deploy_to}/current"
end
desc 'Custom stop task for Merb'
task :stop, :roles => :app do
invoke_command "cd #{deploy_to}/current; merb --kill all"
end
end
Edited line 1 :
Blog Posts
Would be great to see updated merb + nginx info. Everyone that has been really into merb for a long time adjusts easily to the small changes, but a lot of us aren’t sure where to start on this.
Edited line 4 :
- Nginx and Mongrel Merb – Yes, it’s outdated but that has a great nginx configuration file.
- Soar with Merb
Here is a good resource:
Edited line 7 :
Actually explains deployment quite well. I would love to extract the important pieces from each article onto this page. I might do it if I check back and no one as added to this.
Edited line 10 :
Yes, it’s outdated but that has a great nginx configuration file. That along with:
Edited line 13 :
Choosing An Application Server
Edited line 16 :
- Due its being threaded, Mongrel is still the king as a general purpose application server.
- An evented server (Thin, Ebb, Evented Mongrel) is only a viable option for applications that have very fast response times for every action (i.e. an API that serves JSON).
My recommended configuration for merb on production: “merb -a thin -c 4—port 9000”
Edited line 19 :
Configuring for a shared host
Actually explains deployment quite well. I would love to extract the important pieces from each article onto this page. I might do it if I check back and no one as added to this.
Edited line 22 :
If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Edited line 25 :
Booting Your Production Application
merb -c 4 --port 9000 will start four Mongrels on ports 9000, 9001, 9002 and 9003. You can direct Merb to use a different application server with -a: merb -a thin -c 4 --port 9000
Configuring for a shared host: If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Edited line 22 :
“Starter guide for getting configured on Fedora 8:http://skippidydoo.com/posts/show/e3f8c6ed-ab52-4626-9e4a-bc633ab4ea69” – Updated 4/13/08
Edited line 25 :
Configuring for a shared host: If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Configuring for a shared host If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Edited line 19 :
“Starter guide for getting configured on Fedora 8:http://skippidydoo.com/posts/show/e3f8c6ed-ab52-4626-9e4a-bc633ab4ea69” – Updated 4/13/08
Configuring for a shared host If you want to run your merb app on a /prefix on your server, edit init.rb and add c[:path_prefix] = ’/prefix’ within the Merb::Config.use do |c| block.
Edited line 15 :
My recommended configuration for merb on production: “merb -a thin -c 4—port 9000”
Edited line 16 :
Actually explains deployment quite well. I would love to extract the important pieces from each article onto this page. I might do it if I check back and no one as added to this.
Actually explain deployment quite well. I would love to extract the important pieces from each article onto this page. I might do it if I check back and no one as added to this.
Edited line 7 :
Yes, it’s outdated but that has a great nginx configuration file. That along with:
Actually explain deployment quite well. I would love to extract the important pieces from each article onto this page. I might do it if I check back and no one as added to this.
Edited line 7 :
Nginx and Mongrel Merb:”http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano”
Edited line 7 :
Nginx and Mongrel Merb:”http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano”
Edited line 7 :
Edited line 7 :
http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano and Mongrel Merb
“http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano” : Nginx and Mongrel Merb
Edited line 7 :
“http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano” : Nginx and Mongrel Merb
http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano
Edited line 1 :
Here is a good resource:
http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano