Skip to content

Instantly share code, notes, and snippets.

View albertogg's full-sized avatar

Alberto Grespan albertogg

View GitHub Profile
@albertogg
albertogg / nginx_gunicorn.conf
Created December 31, 2012 19:40
nginx server block = sites-enabled + gunicorn
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
@albertogg
albertogg / deploy.rb
Created October 5, 2012 01:59
Capistrano deploy.rb with rbenv, unicorn and nginx.
require 'bundler/setup'
server "some-ip", :web, :app, :db, primary: true
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
set :application, "application-name"
set :repository, "git@git"
set :user, "deploy" # As defined on your server
@albertogg
albertogg / development.rb
Last active July 19, 2019 00:16
unicorn init.d script with unicorn.rb configuration and terminal stdout for development.
# Add this in the environments/development.rb to view the output of the server directly from the terminal
# Config Logger.
config.logger = Logger.new(STDOUT)
config.logger.level = Logger.const_get(
ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'DEBUG'
)