Skip to content

Instantly share code, notes, and snippets.

@gudata
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save gudata/9349609 to your computer and use it in GitHub Desktop.

Select an option

Save gudata/9349609 to your computer and use it in GitHub Desktop.
#nginx configuration
upstream simple_ci {
server unix:///tmp/simple_ci.0.sock;
}
server {
listen 80 default_server; # e.g., listen 192.168.1.1:80;
server_name ci.empowerunited.com; # e.g., server_name source.example.com;
root /home/ci_user/simple_ci/public;
access_log /var/log/nginx/simple_ci_access.log;
error_log /var/log/nginx/simple_ci_error.log;
location / {
try_files $uri $uri/index.html $uri.html @simple_ci;
}
location /yatoto_doc {
alias /home/ci_user/yatoto/doc/app;
}
location @simple_ci {
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://simple_ci;
}
}
su - simple_ci
cd /home/ci_user/simple_ci
thin -C thin.yml start
exit
killall -HUP nginx
pid: tmp/pids/simple_ci_thin.pid
tag: simple_ci
user: ci_user
group: ci_user
socket: /tmp/simple_ci.sock
onebyone: true
threaded: false
no-epoll: false
daemonize: true
timeout: 30
wait: 30
log: log/production.log
max_conns: 1024
require: []
environment: production
max_persistent_conns: 512
servers: 1
chdir: /home/ci_user/simple_ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment