mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-22 02:52:49 +01:00
parent
5467b1b50e
commit
c07c84ad1f
@ -6,4 +6,4 @@ ADD Gemfile /app/Gemfile
|
|||||||
ADD Gemfile.lock /app/Gemfile.lock
|
ADD Gemfile.lock /app/Gemfile.lock
|
||||||
RUN bundle install --jobs=8 --without development test
|
RUN bundle install --jobs=8 --without development test
|
||||||
ADD . /app
|
ADD . /app
|
||||||
CMD ["puma", "-C", "config/puma.rb"]
|
CMD ["unicorn", "-c", "./config/unicorn.rb"]
|
||||||
|
2
Gemfile
2
Gemfile
@ -6,7 +6,6 @@ ruby '2.5.1'
|
|||||||
|
|
||||||
gem 'oj'
|
gem 'oj'
|
||||||
gem 'ox'
|
gem 'ox'
|
||||||
gem 'puma'
|
|
||||||
gem 'rack-cors'
|
gem 'rack-cors'
|
||||||
gem 'rake'
|
gem 'rake'
|
||||||
gem 'redcarpet'
|
gem 'redcarpet'
|
||||||
@ -14,6 +13,7 @@ gem 'rufus-scheduler'
|
|||||||
gem 'sass'
|
gem 'sass'
|
||||||
gem 'sequel_pg'
|
gem 'sequel_pg'
|
||||||
gem 'sinatra'
|
gem 'sinatra'
|
||||||
|
gem 'unicorn'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'shotgun'
|
gem 'shotgun'
|
||||||
|
@ -15,6 +15,7 @@ GEM
|
|||||||
raabro (~> 1.1)
|
raabro (~> 1.1)
|
||||||
hashdiff (0.3.7)
|
hashdiff (0.3.7)
|
||||||
jaro_winkler (1.5.1)
|
jaro_winkler (1.5.1)
|
||||||
|
kgio (2.11.2)
|
||||||
method_source (0.9.0)
|
method_source (0.9.0)
|
||||||
minitest (5.11.3)
|
minitest (5.11.3)
|
||||||
minitest-around (0.4.1)
|
minitest-around (0.4.1)
|
||||||
@ -31,7 +32,6 @@ GEM
|
|||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.9.0)
|
method_source (~> 0.9.0)
|
||||||
public_suffix (3.0.3)
|
public_suffix (3.0.3)
|
||||||
puma (3.12.0)
|
|
||||||
raabro (1.1.6)
|
raabro (1.1.6)
|
||||||
rack (2.0.5)
|
rack (2.0.5)
|
||||||
rack-cors (1.0.2)
|
rack-cors (1.0.2)
|
||||||
@ -40,6 +40,7 @@ GEM
|
|||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rainbow (3.0.0)
|
rainbow (3.0.0)
|
||||||
|
raindrops (0.19.0)
|
||||||
rake (12.3.1)
|
rake (12.3.1)
|
||||||
rb-fsevent (0.10.3)
|
rb-fsevent (0.10.3)
|
||||||
rb-inotify (0.9.10)
|
rb-inotify (0.9.10)
|
||||||
@ -78,6 +79,9 @@ GEM
|
|||||||
tzinfo (1.2.5)
|
tzinfo (1.2.5)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
unicode-display_width (1.4.0)
|
unicode-display_width (1.4.0)
|
||||||
|
unicorn (5.4.1)
|
||||||
|
kgio (~> 2.6)
|
||||||
|
raindrops (~> 0.7)
|
||||||
vcr (4.0.0)
|
vcr (4.0.0)
|
||||||
webmock (3.4.2)
|
webmock (3.4.2)
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.3.6)
|
||||||
@ -93,7 +97,6 @@ DEPENDENCIES
|
|||||||
oj
|
oj
|
||||||
ox
|
ox
|
||||||
pry
|
pry
|
||||||
puma
|
|
||||||
rack-cors
|
rack-cors
|
||||||
rack-test
|
rack-test
|
||||||
rake
|
rake
|
||||||
@ -104,6 +107,7 @@ DEPENDENCIES
|
|||||||
sequel_pg
|
sequel_pg
|
||||||
shotgun
|
shotgun
|
||||||
sinatra
|
sinatra
|
||||||
|
unicorn
|
||||||
vcr
|
vcr
|
||||||
webmock
|
webmock
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
|
|
||||||
threads_count = Integer(ENV['MAX_THREADS'] || 5)
|
|
||||||
threads threads_count, threads_count
|
|
||||||
|
|
||||||
preload_app!
|
|
||||||
|
|
||||||
rackup DefaultRackup
|
|
||||||
port ENV['PORT'] || 3000
|
|
||||||
environment ENV['APP_ENV'] || 'developments'
|
|
11
config/unicorn.rb
Normal file
11
config/unicorn.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
worker_process_count = (ENV['WORKER_PROCESSES'] || 4).to_i
|
||||||
|
|
||||||
|
preload_app true
|
||||||
|
worker_processes worker_process_count
|
||||||
|
timeout 10
|
||||||
|
|
||||||
|
before_fork do |_, _|
|
||||||
|
Sequel::DATABASES.each(&:disconnect)
|
||||||
|
end
|
@ -6,7 +6,7 @@ services:
|
|||||||
APP_ENV: development
|
APP_ENV: development
|
||||||
VIRTUAL_HOST: localhost
|
VIRTUAL_HOST: localhost
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "8080:8080"
|
||||||
scheduler:
|
scheduler:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
|
@ -5,12 +5,12 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- data:/var/lib/postgresql/data
|
- data:/var/lib/postgresql/data
|
||||||
web:
|
web:
|
||||||
command: puma -C config/puma.rb
|
command: unicorn -c config/unicorn.rb
|
||||||
entrypoint: bin/wait-for-it.sh db:5432 -s --
|
entrypoint: bin/wait-for-it.sh db:5432 -s --
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: postgres://postgres@db/postgres
|
DATABASE_URL: postgres://postgres@db/postgres
|
||||||
expose:
|
expose:
|
||||||
- '3000'
|
- '8080'
|
||||||
links:
|
links:
|
||||||
- db
|
- db
|
||||||
scheduler:
|
scheduler:
|
||||||
|
Loading…
Reference in New Issue
Block a user