Skip to content

Instantly share code, notes, and snippets.

View intinig's full-sized avatar

Giovanni Intini intinig

View GitHub Profile
upstream rgts {
server unix:/var/run/rgts.sock max_fails=0;
}
server {
listen 80;
server_name ${NGINX_RGTS_HOST};
root /var/static;
client_max_body_size 4G;
keepalive_timeout 10;
if ENV['SMTP_HOST'].present?
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => ENV['SMTP_HOST'],
:port => ENV['SMTP_PORT'],
:authentication => ENV['SMTP_AUTH'].to_sym,
:user_name => ENV['SMTP_USERNAME'],
:password => ENV['SMTP_PASSWORD'],
:domain => ENV['SMTP_DOMAIN'],
:enable_starttls_auto => (ENV['SMTP_TLS'] == 'true')
require 'rubygems'
require 'lol'
require 'redis'
include Lol
client = Client.new "foo", {region: ENV['API_REGION']}
redis = Redis.new :url => ENV['REDIS_URL']
def fetch client, redis, slice
frontend main
bind /var/run/rgts.sock mode 777
default_backend rgts
acl whitelist src 93.51.152.124 127.0.0.1 10.211.55.1
acl stats path_beg /hstats
block if stats !whitelist
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
user root
group root
defaults
log global
mode http
option httplog
root@7168a7085969:/var/run# ls -al
total 16
drwxrwxrwx 3 root root 4096 Jan 19 10:35 .
drwxr-xr-x 47 root root 4096 Jan 19 10:37 ..
srwxrwxrwx 1 root root 0 Jan 19 10:35 app0.sock
drwxr-xr-x 2 root root 4096 May 22 2014 ldconfig
-rw-r--r-- 1 root root 2 Jan 19 10:35 nginx.pid
srwxrwxrwx 1 root root 0 Jan 19 10:35 rgts.sock
root@7168a7085969:/var/run#
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
defaults
log global
mode http
upstream rgts {
server unix:/var/run/app0.sock;
server unix:/var/run/app1.sock;
}
server {
listen 80;
server_name ${NGINX_RGTS_HOST};
root /app/public;
upstream rgts {
server unix:/var/run/app0.sock;
server unix:/var/run/app1.sock;
}
server {
listen 80;
server_name $nginx_rgts_host *.$nginx_rgts_host;
root /app/public;
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#config.vm.define "#{ENV['VAGRANT_DEFAULT_PROVIDER']}_boot2docker"
config.vm.box = "yungsang/boot2docker"
config.vm.network "private_network", ip: ENV['BOOT2DOCKER_IP'] || "10.211.55.5"