Unicorn and Nginx configs
This commit is contained in:
parent
ce91297ee0
commit
9dc851b95e
|
@ -0,0 +1,14 @@
|
||||||
|
server {
|
||||||
|
listen pm.localhots.xxx:80;
|
||||||
|
server_name pm.localhots.xxx;
|
||||||
|
root /home/www/apps/pastemaster/current;
|
||||||
|
|
||||||
|
location ^~ /public/ {
|
||||||
|
gzip_static on;
|
||||||
|
add_header Cache-Control public;
|
||||||
|
}
|
||||||
|
|
||||||
|
try_files $uri;
|
||||||
|
client_max_body_size 10M;
|
||||||
|
keepalive_timeout 10;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
working_directory '/home/www/apps/pastemaster/current'
|
||||||
|
worker_processes 2
|
||||||
|
timeout 10
|
||||||
|
|
||||||
|
listen '/tmp/pastemaster.unicorn.sock', backlog: 64
|
||||||
|
pid '/tmp/pastemaster.unicorn.pid'
|
||||||
|
|
||||||
|
stderr_path '/dev/null'
|
||||||
|
stdout_path '/dev/null'
|
|
@ -27,8 +27,11 @@ class Pastemaster < Sinatra::Application
|
||||||
set :server, 'unicorn'
|
set :server, 'unicorn'
|
||||||
set :public_folder, 'public'
|
set :public_folder, 'public'
|
||||||
set :views, File.expand_path('../app/views', __FILE__)
|
set :views, File.expand_path('../app/views', __FILE__)
|
||||||
|
set :slim, pretty: true
|
||||||
|
|
||||||
register Sinatra::AssetPack
|
register Sinatra::AssetPack
|
||||||
|
use ErrorPages
|
||||||
|
helpers ErrorPages::Forbidden
|
||||||
|
|
||||||
assets do
|
assets do
|
||||||
serve '/assets/js', from: 'app/assets/js'
|
serve '/assets/js', from: 'app/assets/js'
|
||||||
|
@ -48,11 +51,6 @@ class Pastemaster < Sinatra::Application
|
||||||
css_compression :simple
|
css_compression :simple
|
||||||
end
|
end
|
||||||
|
|
||||||
set :slim, pretty: true
|
|
||||||
|
|
||||||
use ErrorPages
|
|
||||||
helpers ErrorPages::Forbidden
|
|
||||||
|
|
||||||
get '/' do
|
get '/' do
|
||||||
@syntaxes = CONFIG.syntaxes_map
|
@syntaxes = CONFIG.syntaxes_map
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue