unicorn

Gitlab社区版 Yum方式 安装 配置

不羁的心 提交于 2019-11-30 12:02:57
参考大神安装步骤: https://www.cnblogs.com/menghaoqi/p/6296127.html 1、配置yum源 vim /etc/yum.repos.d/gitlab-ce.repo 复制以下内容到上面的文件内 [gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1 2、更新本地yum缓存 sudo yum makecache 3、安装GitLab社区版 sudo yum install gitlab-ce #自动安装最新版 sudo yum install gitlab-ce-x.x.x #安装指定版本 GitLab常用命令 sudo gitlab-ctl start # 启动所有 gitlab 组件; sudo gitlab-ctl stop # 停止所有 gitlab 组件; sudo gitlab-ctl restart # 重启所有 gitlab 组件; sudo gitlab-ctl status # 查看服务状态; sudo gitlab-ctl reconfigure # 启动服务; sudo vim /etc/gitlab

Stream console output through HTTP (with Ruby)

女生的网名这么多〃 提交于 2019-11-30 11:37:24
问题 I am trying to run some commands remotely and SSH'ing in to the machine is not an option. What I am trying to do is setup a Sinatra app that runs some specific commands and streams the output through HTTP. The sample action looks like this: get "/log" do `tail -f some.log` end 1 As far as I've read, I need to use Unicorn (or Mongrel) because Thin does not support streaming data 2 I think I need to pipe the commands output through some kind of IO ruby object I almost know how to do (1) but

How to start rails server in production mode using unicorn and config file?

只愿长相守 提交于 2019-11-30 11:11:57
I add Gem 'unicorn' to Gemfile and call rails server unicorn -e production , but I get a load error. Then I add Gem 'unicorn_rails' , then call rails server unicorn -e production , but I can't find the socket file. So I am considering if it doesn't use the config/unicorn.rb file as the configuration? So I call unicorn_rails -c config/unicorn.rb -E production -D , but I get another error text file busy . So now I am stuck in this matter, could you help me? :) It should be something looks like: bundle exec unicorn -E production -c config/unicorn.rb and you should only need unicorn gem bundle

Puma Cluster configuration on Heroku

孤者浪人 提交于 2019-11-30 10:22:42
问题 I need some help with my configuration of Puma (Multi-Thread+Multi-Core Server) on my RoR4 Heroku app. The Heroku docs on that are not quite up-to-date. I followed this one: Concurrency and Database Connections for the configuration, which does not mention the configuration for a Cluster, so I had to use both types together (threaded and multicore). My current configuration: ./Procfile web: bundle exec puma -p $PORT -C config/puma.rb ./config/puma.rb environment production threads 0,16

HTTP streaming in rails not working when using Rack::Deflater

被刻印的时光 ゝ 提交于 2019-11-30 09:54:46
I've setup unicorn in rails 3.1 and http streaming works until I enable Rack::Deflater. I've tried both with and without use Rack::Chunked. In curl I can see my response while in chrome I get the following errror: ERR_INVALID_CHUNKED_ENCODING The result is same in other browsers (firefox, safari) and between development (osx) and production (heroku). config.ru: require ::File.expand_path('../config/environment', __FILE__) use Rack::Chunked use Rack::Deflater run Site::Application unicorn.rb: listen 3001, :tcp_nopush => false worker_processes 1 # amount of unicorn workers to spin up timeout 30

Unicorn fails to start on Vagrant box due to Errno::EPERM

不问归期 提交于 2019-11-30 07:25:10
When I run the following command to start Unicorn for a Sinatra app on my Vagrant box(ubuntu-12.04.2-server-i386) sudo unicorn -c unicorn.rb -E development -D -l 0.0.0.0:8080 I get the following error in the Unicorn logs. I, [2013-05-05T19:15:15.538805 #2357] INFO -- : listening on addr=0.0.0.0:8080 fd=5 F, [2013-05-05T19:15:15.541673 #2357] FATAL -- : error adding listener addr=/home/vagrant/tmp/myapp/sockets/unicorn.sock /home/vagrant/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/unicorn-4.3.1/lib/unicorn/socket_helper.rb:140:in `initialize': Operation not permitted - "/home/vagrant

how to restart unicorn manually

狂风中的少年 提交于 2019-11-30 04:56:30
I'm not confident that unicorn is restarting properly when I run cap deploy as certain changes are not showing in the app, therefore I wanted to restart unicorn manually on my remote server. I have navigated into etc/init.d and see a listing for unicorn_myapp but it's not a directory (i.e. I can't cd into it). Based on the code below from my deploy.rb file, is there something I can do from here to restart unicorn? I tried to do run unicorn_myapp restart but it said run isn't a command namespace :deploy do %w[start stop restart].each do |command| desc "#{command} unicorn server" task command,

gitlab docker Web界面打开反应迟钝的解决办法

血红的双手。 提交于 2019-11-30 02:44:05
参考: https://blog.csdn.net/happyfreeangel/article/details/88653846 解决办法: 修改gitlab的配置文件:gitlab.rb 位置在容器中的/etc/gitlab/config 使用容器时必须挂载到外面的存储,要不重新启动后,配置又没了. 在配置文件中找到 unicorn[‘port’]将其修改为不和宿主机冲突的端口号 。如下: Advanced settings unicorn[‘listen’] = ‘127.0.0.1’ unicorn[‘port’] = 8081 重现启动gitlab: gitlab-ctl restart 重现启动容器 或在容器里直接重现启动服务. 重新打开网页测试,发现终于正常了。 响应时间缩短了98%以上,已经可以和正常网站的浏览速度匹敌了. ———————————————— 版权声明:本文为CSDN博主「开心自由天使」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/happyfreeangel/article/details/88653846 来源: https://my.oschina.net/u/1161889/blog/3107864

why did gitlab 6 switch back to unicorn?

[亡魂溺海] 提交于 2019-11-30 01:13:12
Gitlab 6.0 was released yesterday. I am curious to know why they switched to Unicorn from Puma . Versions prior to 5 were using Unicorn . I thought switch to Puma was for the better. Is there a technical reason for this switch? GitLab B.V. CEO here, I agree with Hongli his comment that "If there are issues then they are likely in Gitlab's code.". We tried to fix them but GitLab is one of the largest open source Rails applications and the issues where hard to reproduce. So in the end we opted for the most pragmatic solution, switching back to Unicorn. We love Puma, Unicorn and Passenger and

使用Nginx + unicorn搭建ruby on rails的生产环境

。_饼干妹妹 提交于 2019-11-30 01:09:39
有三台机器,操作系统都是CentOS 6.3 64位: 其中172.16.9.100,安装Nginx服务器;另外的两台172.16.9.101和172.16.9.102安装unicorn,作为RoR的应用服务器。在这里先保证ruby及rails已经在101和102两台机器上配置好,这是前提。如何安装Nginx及RoR的环境就不在这里说了,很多文章都介绍得很详细。 这里假设项目在 /var/www/demo_project 文件夹中 在101上使用 gem install unicorn 命令安装unicorn。 新建内容为以下的一个文件,需要进行修改的地方请看文件中的中文注释,文件放置到 /var/www/demo_project_unicorn.rb, 这个文件是对这个项目的生产环境配置 # Sample verbose configuration file for Unicorn (not Rack) # # This configuration file documents many features of Unicorn # that may not be needed for some applications. See # http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb # for a much