Try nginx
This commit is contained in:
parent
6412a07ad1
commit
97958a4ce4
|
@ -1,2 +1,3 @@
|
|||
https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
https://github.com/drogus/last-commit-sha-buildpack.git
|
||||
https://github.com/ryandotsmith/nginx-buildpack.git
|
||||
|
|
2
Procfile
2
Procfile
|
@ -1,2 +1,2 @@
|
|||
web: bundle exec ./script/server
|
||||
web: bin/start-nginx bundle exec ./script/server
|
||||
console: bundle exec ./script/console
|
||||
|
|
9
config/puma-config.rb
Normal file
9
config/puma-config.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
root = File.expand_path('../..', __FILE__)
|
||||
|
||||
rackup "#{root}/config.ru"
|
||||
|
||||
bind 'unix:///tmp/nginx.socket'
|
||||
|
||||
environment ENV['RACK_ENV'] || 'development'
|
||||
|
||||
threads 0, 16
|
|
@ -12,6 +12,7 @@ require 'raven'
|
|||
require 'sidekiq'
|
||||
require 'metriks/reporter/logger'
|
||||
require 'travis/support/log_subscriber/active_record_metrics'
|
||||
require 'fileutils'
|
||||
|
||||
# Rack class implementing the HTTP API.
|
||||
# Instances respond to #call.
|
||||
|
@ -45,6 +46,7 @@ module Travis::Api
|
|||
def self.setup(options = {})
|
||||
setup! unless setup?
|
||||
Endpoint.set(options) if options
|
||||
FileUtils.touch('/tmp/app-initialized')
|
||||
end
|
||||
|
||||
def self.new(options = {})
|
||||
|
|
|
@ -3,6 +3,6 @@ cd "$(dirname "$0")/.."
|
|||
[ $PORT ] || PORT=3000
|
||||
[ $RACK_ENV ] || RACK_ENV=development
|
||||
|
||||
cmd="ruby -I lib -S bundle exec ruby -I lib -S puma config.ru -p $PORT -e $RACK_ENV --threads 0:16"
|
||||
cmd="ruby -I lib -S bundle exec ruby -I lib -S puma -C config/puma-config.rb"
|
||||
[[ $RACK_ENV == "development" ]] && exec rerun "$cmd -b tcp://127.0.0.1:$PORT"
|
||||
exec $cmd
|
||||
|
|
Loading…
Reference in New Issue
Block a user