Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fine tunning after realising some bugs

  • Loading branch information...
commit 69c71c7604140e198ef259ece6b2fe7a177e7cd4 1 parent 76f82ac
Paulo Fagiani authored
Showing with 21 additions and 36 deletions.
  1. +1 −1  lib/bluepill.sh
  2. +18 −33 lib/passenger.sh
  3. +1 −1  lib/redis.sh
  4. +1 −1  lib/ruby.sh
2  lib/bluepill.sh
View
@@ -5,7 +5,7 @@ function install_bluepill {
echo "local6.* /var/log/bluepill.log" > /etc/rsyslog.d/bluepill.conf
sed -i '/\/var\/log\/messages/i/var/log/bluepill.log' /etc/logrotate.d/rsyslog
mkdir -p /var/bluepill/pids /var/bluepill/socks
- echo "$DEPLOY_USER ALL=(ALL) NOPASSWD:/usr/local/bin/bluepill" >> /etc/sudoers
+ echo "$USER_NAME ALL=(ALL) NOPASSWD:/usr/local/bin/bluepill" >> /etc/sudoers
cat > /etc/init.d/bluepill << EOF
#!/bin/sh
51 lib/passenger.sh
View
@@ -3,46 +3,31 @@
function install_passenger_with_nginx {
add-apt-repository -y ppa:brightbox/passenger-nginx
apt-get -y update
- apt-get -y install nginx-full
+ apt-get -y install libapache2-mod-passenger nginx-full
cat <<EOF > /etc/nginx/conf.d/passenger.conf
passenger_root /usr/lib/phusion-passenger;
+passenger_ruby /usr/local/bin/ruby;
EOF
}
function set_default_nginx_config_with_passenger {
cat <<EOF > /etc/nginx/sites-available/default
-worker_processes 6;
-
-events {
- worker_connections 1024;
-}
-
-http {
- passenger_root /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.11;
- passenger_ruby /usr/local/bin/ruby;
-
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
-
- server {
- listen 80;
- server_name $DOMAIN_NAME;
- root /home/app/production/current/public;
- passenger_enabled on;
- access_log logs/app.access.log;
- error_log logs/app.error.log;
- gzip on;
- gzip_http_version 1.1;
- gzip_comp_level 6;
- gzip_proxied any;
- gzip_min_length 1024;
- gzip_buffers 16 8k;
- gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
- gzip_vary on;
- gzip_disable “MSIE [1-6].(?!.*SV1)”;
- }
+server {
+ listen 80;
+ server_name $DOMAIN_NAME;
+ root /home/app/production/current/public;
+ passenger_enabled on;
+ access_log /var/log/nginx/app.access.log;
+ error_log /var/log/nginx/app.error.log;
+ gzip on;
+ gzip_http_version 1.1;
+ gzip_comp_level 6;
+ gzip_proxied any;
+ gzip_min_length 1024;
+ gzip_buffers 16 8k;
+ gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
+ gzip_vary on;
+ gzip_disable “MSIE [1-6].(?!.*SV1)”;
}
EOF
/etc/init.d/nginx restart
2  lib/redis.sh
View
@@ -12,9 +12,9 @@ function install_redis {
/usr/sbin/useradd --system --user-group --home-dir /var/lib/redis redis
chown redis.redis /var/lib/redis
chown redis.redis /var/log/redis
- /usr/sbin/update-rc.d -f redis-server defaults
wget "https://github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-server" -O /etc/init.d/redis-server
chmod +x /etc/init.d/redis-server
+ /usr/sbin/update-rc.d -f redis-server defaults
cat > /etc/redis.conf << EOF
daemonize yes
pidfile /var/run/redis.pid
2  lib/ruby.sh
View
@@ -27,7 +27,7 @@ update: --no-ri --no-rdoc --env-shebang
update_sources: true
EOF
cp ~/.gemrc $USER_HOME
- chown $DEPLOY_USER:$DEPLOY_USER $USER_HOME/.gemrc
+ chown $USER_NAME:$USER_NAME $USER_HOME/.gemrc
}
function update_rubygems {
Please sign in to comment.
Something went wrong with that request. Please try again.