zoukankan      html  css  js  c++  java
  • different between unicorn / unicorn_rails

    $ unicorn_rails -h
    Usage: unicorn_rails [ruby options] [unicorn_rails options] [rackup config file]
    Ruby options:
      -e, --eval LINE          evaluate a LINE of code
      -d, --debug              set debugging flags (set $DEBUG to true)
      -w, --warn               turn warnings on for your script
      -I, --include PATH       specify $LOAD_PATH (may be used more than once)
      -r, --require LIBRARY    require the library, before executing your script
    unicorn_rails options:
      -o, --host HOST          listen on HOST (default: 0.0.0.0)
      -p, --port PORT          use PORT (default: 8080)
      -E, --env RAILS_ENV      use RAILS_ENV for defaults (default: development)
      -D, --daemonize          run daemonized in the background
      -l {HOST:PORT|PATH},     listen on HOST:PORT or PATH
          --listen             this may be specified multiple times
                               (default: 0.0.0.0:8080)
      -c, --config-file FILE   Unicorn-specific config file
    
          --path PATH          Runs Rails app mounted at a specific path.
                               (default: /)
    Common options:
      -h, --help               Show this message
      -v, --version            Show version
    $ unicorn -h
    Usage: unicorn [ruby options] [unicorn options] [rackup config file]
    Ruby options:
      -e, --eval LINE          evaluate a LINE of code
      -d, --debug              set debugging flags (set $DEBUG to true)
      -w, --warn               turn warnings on for your script
      -I, --include PATH       specify $LOAD_PATH (may be used more than once)
      -r, --require LIBRARY    require the library, before executing your script
    unicorn options:
      -o, --host HOST          listen on HOST (default: 0.0.0.0)
      -p, --port PORT          use PORT (default: 8080)
      -E, --env RACK_ENV       use RACK_ENV for defaults (default: development)
      -N                       do not load middleware implied by RACK_ENV
          --no-default-middleware
      -D, --daemonize          run daemonized in the background
    
      -s, --server SERVER      this flag only exists for compatibility
      -l {HOST:PORT|PATH},     listen on HOST:PORT or PATH
          --listen             this may be specified multiple times
                               (default: 0.0.0.0:8080)
      -c, --config-file FILE   Unicorn-specific config file
    Common options:
      -h, --help               Show this message
      -v, --version            Show version

    config/unicorn.conf.rb

    # See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
     # documentation.
     
    -rails_env = ENV['RAILS_ENV'] || 'staging'
    +rails_env = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'staging'
    Add a comment to this line
     # Use at least one worker per core if you're on a dedicated server,
     # more will usually help for _short_ waits on databases/caches.
    -worker_processes rails_env == "production" ? 4 : 1
    +worker_processes (rails_env == "production" ? 4 : 1)
     
     # Since Unicorn is never exposed to outside clients, it does not need to
     # run on the standard HTTP port (80), there is no reason to start Unicorn
  • 相关阅读:
    Entity Framework版本历史概览
    Windows客户端C/C++编程规范“建议”——风格
    Bitbucket免费的私有仓库
    呵呵!手把手带你在 IIS 上运行 Python(转)
    RDLC系列之七 条码打印
    WCF 、Web API 、 WCF REST 和 Web Service 的区别
    使用DataAnnotations实现数据验证
    WPF:如何为程序添加splashScreen(初始屏幕)
    无法解析此远程名称: 'www.***.com' 解决办法 请求因 HTTP 状态 417 失败
    关于“服务器提交了协议冲突. Section=ResponseStatusLine"问题
  • 原文地址:https://www.cnblogs.com/iwangzheng/p/5354251.html
Copyright © 2011-2022 走看看