Deployment / Edits

2 months ago

Edited line 132 :

listen 80;
listen 127.0.0.1:80;

2 months ago

Edited line 132 :

listen 127.0.0.1:80;
listen xx.xx.xxx.xx:80;

Edited line 136 :

server_name www.myservername.com;
server_name xx.xx.xxx.xx;

Edited line 138 :

root /path/to/app/current/public;
root /path/to/app/current;

Edited line 169 :

root /path/to/app/current/public;
root /path/to/app/current;

2 months ago

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.

2 months ago

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.

2 months ago

Edited line 5 :

  • Phusion Passenger now supports Merb Check out the Phusion Passenger page for more info.
  • 2 months ago

    Edited line 5 :

  • Phusion Passenger now supports Merb
  • Nginx and Mongrel Merb – Yes, it’s outdated but that has a great nginx configuration file.
  • Nginx and Mongrel Merb – Yes, it’s outdated but that has a great nginx configuration file.
  • 2 months ago

    Edited line 156 :

    proxy_pass http://proxy_server;
    proxy_pass http://polling_server;

    3 months ago

    Edited line 24 :

    merb -e production -c 4 --port 9000
    will start four Mongrels on ports 9000, 9001, 9002 and 9003 in production mode.
    merb -c 4 --port 9000
    will start four Mongrels on ports 9000, 9001, 9002 and 9003.

    Edited line 39 :

    run "merb -a #{adapter} -e production -c #{processes} --port #{start_port} -m #{current_path} -L #{log_path}"
    run "merb -a #{adapter} -c #{processes} --port #{start_port} -m #{current_path} -L #{log_path}"

    3 months ago

    Edited line 44 :

    run "cd #{current_path} && merb -a #{adapter} -k all"
    run "cd #{current_path}; merb -a #{adapter} -k all"

    3 months ago

    Edited line 108 :

    upstream proxy_server {
    upstream polling_server {

    4 months ago

    Edited line 39 :

    run "merb -a #{adapter} -c #{processes} --port #{start_port} -m #{current_path} -L #{log_path}"
    run "merb -a #{adapter} -c #{processes} --port #{start_port}" -m #{current_path} -L #{log_path}"

    4 months ago

    Edited line 29 :

    # config/deploy.rb 
    
    # config/deploy.rb 
    

    Edited line 52 :

    end
    end

    4 months ago

    Edited line 7 :

    Edited line 24 :

    We should discuss: http://github.com/eldiablo/merb-manage/tree/master

    4 months ago

    Edited line 24 :

    We should discuss: http://github.com/eldiablo/merb-manage/tree/master

    4 months ago

    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:

    4 months ago

    4 months ago

    Edited line 59 :

    In Debian

    In debian

    Edited line 67 :

    Make sure you have the community repo configured in your /etc/pacman.conf

    Make sure you have the community repo configured in your /etc/pacman.conf

    4 months ago

    Edited line 56 :

    Install Nginx

    h3.Install Nginx

    4 months ago

    Edited line 56 :

    h3.Install Nginx

    Install Nginx

    Edited line 59 :

    In debian

    In debian

    Edited line 64 :

    In Archlinux

    In Archlinux

    4 months ago

    Edited line 23 :

    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.

    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

    4 months ago

    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

    4 months ago

    Edited line 65 :

    $ sudo apt-get install nginx
     
    $ sudo apt-get install nginx 
    

    4 months ago

    Edited line 64 :

     
    $ sudo apt-get install nginx 
    

    4 months ago

    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 
    
     
    

    4 months ago

    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; 
     } 
    } 
    

    4 months ago

    Edited line 68 :

    # /etc/nginx/nginx.conf 
    
     
    # /etc/nginx/nginx.conf 
    

    Edited line 105 :

    4 months ago

    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; 
    } 
     
    

    4 months ago

    Edited line 38 :

    set :processes, 4
    set :instances, 4

    Edited line 44 :

    run "merb -a #{adapter} -c #{processes} --port #{start_port}" -m #{current_path} -L #{log_path}"
    run "merb -a #{adapter} -c #{instances} --port #{start_port}" -m #{current_path} -L #{log_path}"

    4 months ago

    Edited line 44 :

    run "merb -a #{adapter} -c #{instances} --port #{start_port}" -m #{current_path} -L #{log_path}"
    run "merb -a #{adapter} -c #{instances} --port #{start_port}" -m #{current_path} -L log_path

    4 months ago

    Edited line 38 :

    set :log_path, "#{shared_path}/log/production.log"

    Edited line 43 :

    run "merb -a #{adapter} -c #{instances} --port #{start_port}" -m #{current_path} -L log_path
    run "merb -a #{adapter} -c #{instances} --port #{start_port}" -m #{current_path} -L #{shared_path}/log/production.log"

    4 months ago

    Edited line 34 :

    set :adapter, 'mongrel' # or 'thin' set :start_port, 4000 set :instances, 4

    Edited line 36 :

    desc "Start Merb Instances" task :start do run "merb -a #{adapter} -c #{instances} --port #{start_port}" -m #{current_path} -L #{shared_path}/log/production.log"
    desc 'Custom start task for Merb' task :start, :roles => :app do invoke_command "merb -c 4 -p 9000 -L #{shared_path}/log/production.log -m #{deploy_to}/current"

    Edited line 41 :

    desc "Stop Merb Instances" task :stop do run "cd #{current_path}; merb -a #{adapter} -k all"
    desc 'Custom stop task for Merb' task :stop, :roles => :app do invoke_command "cd #{deploy_to}/current" invoke_command "merb --kill all"

    4 months ago

    Edited line 43 :

    invoke_command "cd #{deploy_to}/current" invoke_command "merb --kill all"
    invoke_command "cd #{deploy_to}/current; merb --kill all"

    4 months ago

    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

    4 months ago

    Edited line 21 :

  • Use of 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) as a long running action will queue any subsequent requests until its completion.
  • Use of 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) as long running actions will queue any subsequent request until completion.
  • 4 months ago

    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.

    4 months ago

    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

    4 months ago

    Edited line 37 :

    This can be done programatically with Capistrano:

    This can be done programatically with Capistrano

    4 months ago

    Edited line 42 :

    desc 'Custom restart task for Merb' task :restart, :roles => :app do deploy.stop deploy.start end

    Edited line 55 :

    end desc 'Custom restart task for Merb' task :restart, :roles => :app do deploy.stop deploy.start

    4 months ago

    Edited line 50 :

    invoke_command "merb -c 4 -p 9000 -L #{shared_path}/log/production.log -m #{deploy_to}/current"
    invoke_command "merb -c 4 --port 9000 --log #{shared_path}/log/production.log --merb-root #{deploy_to}/current"

    4 months ago

    Edited line 21 :

  • Use of 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) as long running actions will queue any subsequent request until completion.
  • 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).
  • 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

    4 months ago

    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 :

    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.

    4 months ago

    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

    4 months ago

    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.

    4 months ago

    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.

    4 months ago

    4 months ago

    Edited line 15 :

    My recommended configuration for merb on production: “merb -a thin -c 4—port 9000”

    4 months ago

    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.

    4 months ago

    Edited line 7 :

    Yes, it’s outdated but that has a great nginx configuration file. That along with:

    Soar with Merb

    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.

    4 months ago

    Edited line 7 :

    4 months ago

    Edited line 7 :

    Nginx and Mongrel Merb:”http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano”

    4 months ago

    Edited line 7 :

    Nginx and Mongrel Merb:”http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano”

    4 months ago

    4 months ago

    Edited line 7 :

    “http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano” : Nginx and Mongrel Merb

    4 months ago

    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

    4 months ago

    Edited line 1 :

    Here is a good resource:

    http://www.benr75.com/articles/2007/12/24/taking_merb_to_production_nginx_evented_mongrel_capistrano

    4 months ago