Skip to content

Instantly share code, notes, and snippets.

@aliou
Created August 3, 2015 17:50
Show Gist options
  • Save aliou/93ce2fc79e5492d6aa53 to your computer and use it in GitHub Desktop.
Save aliou/93ce2fc79e5492d6aa53 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'bundler'
Bundler.require(:default)
require './hooks'
run Hooks
source 'https://rubygems.org'
ruby '2.2.2'
gem 'sinatra'
GEM
remote: https://rubygems.org/
specs:
rack (1.6.4)
rack-protection (1.5.3)
rack
sinatra (1.4.6)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
tilt (2.0.1)
PLATFORMS
ruby
DEPENDENCIES
sinatra
BUNDLED WITH
1.10.5
require 'sinatra'
require 'json'
post '/' do
data = JSON.parse(request.body.read)
puts data
end
# Set the working application directory
# working_directory "/path/to/your/app"
working_directory "/var/www/my_app"
# Unicorn PID file location
# pid "/path/to/pids/unicorn.pid"
pid "/var/www/my_app/pids/unicorn.pid"
# Path to logs
# stderr_path "/path/to/logs/unicorn.log"
# stdout_path "/path/to/logs/unicorn.log"
stderr_path "/var/www/my_app/logs/unicorn.log"
stdout_path "/var/www/my_app/logs/unicorn.log"
# Unicorn socket
# listen "/tmp/unicorn.[app name].sock"
listen "/tmp/unicorn.myapp.sock"
# Number of processes
# worker_processes 4
worker_processes 2
# Time-out
timeout 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment