bonethug 0.0.91 → 0.0.92
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/deploy.rb +17 -9
- data/lib/bonethug/version.rb +2 -2
- data/scripts/ubuntu-12.04 +1 -0
- data/scripts/ubuntu-14.04 +6 -27
- data/scripts/ubuntu-14.04-dev +5 -26
- data/scripts/ubuntu-14.04-php5.5-mod_fastcgi +112 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ff8af2c902ddd1bedf892f3392dc6687f265c23
|
4
|
+
data.tar.gz: cd2015dfa55988bef9d0c8575a8d9690be8936d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8001fa39e992753079a0b1c80aa899b3b3475fcc24ae0279543449a57e419c39b986adfdecd19d8f109e007489c852d04729152edd84569ff2e501379eb95246
|
7
|
+
data.tar.gz: 968067e84643d05b0cb2641d2eea790a3321d3c7f3573cedb476f44465547226701f4ee3de293e469c4e2d0b8116d45d15c15e8abddf968596acb6248ba40cee
|
data/config/deploy.rb
CHANGED
@@ -279,9 +279,23 @@ task :deploy => :environment do
|
|
279
279
|
#{echo_cmd %[#{bundle_bin} install #{bundle_options}]}
|
280
280
|
}
|
281
281
|
|
282
|
-
#
|
283
|
-
#
|
284
|
-
|
282
|
+
# update composer
|
283
|
+
# queue! %[php #{deploy_to}/shared/composer.phar install] if use_composer
|
284
|
+
if use_composer
|
285
|
+
queue %{
|
286
|
+
echo "-----> Installing php dependencies using Composer"
|
287
|
+
#{echo_cmd %[php composer.phar install]}
|
288
|
+
}
|
289
|
+
end
|
290
|
+
|
291
|
+
# update bower
|
292
|
+
# queue! %[cd #{deploy_to}/current && bower install --allow-root && bower update --allow-root] if use_bower
|
293
|
+
if use_bower
|
294
|
+
queue %{
|
295
|
+
echo "-----> Installing front end dependencies using Bower"
|
296
|
+
#{echo_cmd %[bower install --allow-root && bower update --allow-root]}
|
297
|
+
}
|
298
|
+
end
|
285
299
|
|
286
300
|
# rails deploy tasks
|
287
301
|
if deploy.get('project_type') =~ /rails[0-9]?/
|
@@ -356,12 +370,6 @@ task :deploy => :environment do
|
|
356
370
|
end
|
357
371
|
end
|
358
372
|
|
359
|
-
# update composer
|
360
|
-
queue! %[php #{deploy_to}/shared/composer.phar install] if use_composer
|
361
|
-
|
362
|
-
# update bower
|
363
|
-
queue! %[cd #{deploy_to}/current && bower install --allow-root && bower update --allow-root] if use_bower
|
364
|
-
|
365
373
|
# trigger a restart on rack based systems
|
366
374
|
queue! %[touch #{deploy_to}/current/tmp/restart.txt]
|
367
375
|
|
data/lib/bonethug/version.rb
CHANGED
data/scripts/ubuntu-12.04
CHANGED
@@ -13,6 +13,7 @@ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)
|
|
13
13
|
sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
|
14
14
|
sudo apt-add-repository ppa:brightbox/ruby-ng
|
15
15
|
sudo add-apt-repository ppa:ondrej/apache2
|
16
|
+
# sudo add-apt-repository ppa:ondrej/php5-5.6 # too many issues
|
16
17
|
sudo add-apt-repository ppa:ondrej/php5
|
17
18
|
sudo add-apt-repository ppa:ondrej/mysql-5.6
|
18
19
|
|
data/scripts/ubuntu-14.04
CHANGED
@@ -16,6 +16,7 @@ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)
|
|
16
16
|
sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
|
17
17
|
sudo apt-add-repository ppa:brightbox/ruby-ng
|
18
18
|
sudo add-apt-repository ppa:ondrej/apache2
|
19
|
+
# sudo add-apt-repository ppa:ondrej/php5-5.6 # too many issues
|
19
20
|
sudo add-apt-repository ppa:ondrej/php5
|
20
21
|
sudo add-apt-repository ppa:ondrej/mysql-5.6
|
21
22
|
|
@@ -29,7 +30,7 @@ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr
|
|
29
30
|
sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
|
30
31
|
|
31
32
|
# regular packages
|
32
|
-
sudo apt-get install apache2-mpm-
|
33
|
+
sudo apt-get install apache2-mpm-event
|
33
34
|
sudo apt-get install libapache2-mod-qos libapache2-mod-spamhaus libapache2-mod-fastcgi libapache2-mod-evasive
|
34
35
|
sudo apt-get install curl php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
|
35
36
|
sudo apt-get install mysql-server mysql-client sqlite3
|
@@ -44,28 +45,6 @@ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm at
|
|
44
45
|
# Configure stuff
|
45
46
|
# -----------------------------------------------------
|
46
47
|
|
47
|
-
# unix socket
|
48
|
-
# echo "
|
49
|
-
# <IfModule mod_fastcgi.c>
|
50
|
-
# AddHandler php5-fcgi .php
|
51
|
-
# Action php5-fcgi /php5-fcgi
|
52
|
-
# Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
53
|
-
# FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
|
54
|
-
# </IfModule>
|
55
|
-
# " > /etc/apache2/conf.d/php-fpm.conf
|
56
|
-
# sed -i -e "s/listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.sock/g" /etc/php5/fpm/pool.d/www.conf
|
57
|
-
|
58
|
-
## TCP
|
59
|
-
# echo "
|
60
|
-
# <IfModule mod_fastcgi.c>
|
61
|
-
# AddHandler php5-fcgi .php
|
62
|
-
# Action php5-fcgi /php5-fcgi
|
63
|
-
# Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
64
|
-
# FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization
|
65
|
-
# </IfModule>
|
66
|
-
# " > /etc/apache2/conf.d/php-fpm.conf
|
67
|
-
# sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
|
68
|
-
|
69
48
|
# php
|
70
49
|
sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
|
71
50
|
|
@@ -86,22 +65,22 @@ update-alternatives --set ruby /usr/bin/ruby2.1
|
|
86
65
|
# config modules
|
87
66
|
|
88
67
|
# php fpm
|
89
|
-
|
68
|
+
echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" sudo tee /etc/apache2/conf-available/php-fpm.conf
|
90
69
|
sudo a2enconf php-fpm.conf
|
91
70
|
|
92
71
|
# DDoS Protection
|
93
72
|
sudo mkdir -p /var/log/apache2/evasive
|
94
73
|
sudo chown -R www-data:root /var/log/apache2/evasive
|
95
|
-
|
74
|
+
echo -e "<IfModule mod_spamhaus.c>\n DOSHashTableSize 2048\n DOSPageCount 20\n DOSSiteCount 300\n DOSPageInterval 1.0\n DOSSiteInterval 1.0\n DOSBlockingPeriod 10.0\n DOSLogDir “/var/log/apache2/evasive”\n DOSEmailNotify root@localhost\n</IfModule>" | sudo tee /etc/apache2/conf-available/mod-evasive.conf
|
96
75
|
sudo a2enconf mod-evasive.conf
|
97
76
|
|
98
77
|
# DNS Injection
|
99
78
|
sudo touch /etc/spamhaus.wl
|
100
|
-
|
79
|
+
echo -e "<IfModule mod_spamhaus.c>\n MS_METHODS POST,PUT,OPTIONS,CONNECT\n MS_WhiteList /etc/spamhaus.wl\n MS_CacheSize 256\n</IfModule>" | sudo tee /etc/apache2/conf-available/spamhaus.conf
|
101
80
|
sudo a2enconf spamhauf.conf
|
102
81
|
|
103
82
|
# enable modules
|
104
|
-
sudo a2enmod actions fastcgi alias rewrite expires headers qos spamhaus evasive cache cache_disk ssl
|
83
|
+
sudo a2enmod actions fastcgi alias rewrite expires headers qos spamhaus evasive cache cache_disk ssl proxy proxy_fcgi
|
105
84
|
|
106
85
|
# phpmyadmin apache 2.4
|
107
86
|
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
|
data/scripts/ubuntu-14.04-dev
CHANGED
@@ -13,6 +13,7 @@ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)
|
|
13
13
|
sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
|
14
14
|
sudo apt-add-repository ppa:brightbox/ruby-ng
|
15
15
|
sudo add-apt-repository ppa:ondrej/apache2
|
16
|
+
# sudo add-apt-repository ppa:ondrej/php5-5.6 # too many issues
|
16
17
|
sudo add-apt-repository ppa:ondrej/php5
|
17
18
|
sudo add-apt-repository ppa:ondrej/mysql-5.6
|
18
19
|
|
@@ -26,8 +27,8 @@ sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr
|
|
26
27
|
sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
|
27
28
|
|
28
29
|
# regular packages
|
29
|
-
sudo apt-get install apache2-mpm-
|
30
|
-
sudo apt-get install curl libapache2-mod-fastcgi php5-fpm php5 php5-
|
30
|
+
sudo apt-get install apache2-mpm-event
|
31
|
+
sudo apt-get install curl libapache2-mod-fastcgi php5-fpm php5 php5-fcli php5-curl php5-gd php5-imagick php-apc php5-mysql php5-xdebug
|
31
32
|
sudo apt-get install mysql-server mysql-client sqlite3
|
32
33
|
sudo apt-get install imagemagick
|
33
34
|
sudo apt-get install phpmyadmin
|
@@ -40,30 +41,8 @@ sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm at
|
|
40
41
|
# Configure stuff
|
41
42
|
# -----------------------------------------------------
|
42
43
|
|
43
|
-
# unix socket
|
44
|
-
# echo "
|
45
|
-
# <IfModule mod_fastcgi.c>
|
46
|
-
# AddHandler php5-fcgi .php
|
47
|
-
# Action php5-fcgi /php5-fcgi
|
48
|
-
# Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
49
|
-
# FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
|
50
|
-
# </IfModule>
|
51
|
-
# " > /etc/apache2/conf.d/php-fpm.conf
|
52
|
-
# sed -i -e "s/listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.sock/g" /etc/php5/fpm/pool.d/www.conf
|
53
|
-
|
54
|
-
## TCP
|
55
|
-
# echo "
|
56
|
-
# <IfModule mod_fastcgi.c>
|
57
|
-
# AddHandler php5-fcgi .php
|
58
|
-
# Action php5-fcgi /php5-fcgi
|
59
|
-
# Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
|
60
|
-
# FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization
|
61
|
-
# </IfModule>
|
62
|
-
# " > /etc/apache2/conf.d/php-fpm.conf
|
63
|
-
# sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
|
64
|
-
|
65
44
|
sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
|
66
|
-
|
45
|
+
echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" | sudo tee /etc/apache2/conf-available/php-fpm.conf
|
67
46
|
sudo a2enconf php-fpm.conf
|
68
47
|
|
69
48
|
# node
|
@@ -73,7 +52,7 @@ sudo ln -s /usr/bin/nodejs /usr/bin/node
|
|
73
52
|
# ------
|
74
53
|
|
75
54
|
# modules
|
76
|
-
sudo a2enmod actions fastcgi alias rewrite headers ssl
|
55
|
+
sudo a2enmod actions fastcgi alias rewrite headers ssl proxy proxy_fcgi
|
77
56
|
|
78
57
|
# phpmyadmin apache 2.4
|
79
58
|
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
|
@@ -0,0 +1,112 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# -----------------------------------------------------
|
4
|
+
# install native stuff
|
5
|
+
# -----------------------------------------------------
|
6
|
+
|
7
|
+
# update
|
8
|
+
sudo apt-get update && sudo apt-get upgrade
|
9
|
+
|
10
|
+
# install the repo adding scripts
|
11
|
+
sudo apt-get install software-properties-common python-software-properties
|
12
|
+
|
13
|
+
# add repos
|
14
|
+
# sudo add-apt-repository ppa:richarvey/nodejs
|
15
|
+
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
|
16
|
+
sudo add-apt-repository "deb-src http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
|
17
|
+
sudo apt-add-repository ppa:brightbox/ruby-ng
|
18
|
+
sudo add-apt-repository ppa:ondrej/apache2
|
19
|
+
sudo add-apt-repository ppa:ondrej/php5
|
20
|
+
sudo add-apt-repository ppa:ondrej/mysql-5.6
|
21
|
+
|
22
|
+
# update
|
23
|
+
sudo apt-get update && sudo apt-get upgrade
|
24
|
+
|
25
|
+
# install
|
26
|
+
|
27
|
+
# dev headers
|
28
|
+
sudo apt-get install libcurl4-openssl-dev libssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev libapr1-dev libaprutil1-dev ruby2.1-dev
|
29
|
+
sudo apt-get install libmysqlclient-dev libmagickwand-dev libsqlite3-dev libxml2-dev libxslt1-dev
|
30
|
+
|
31
|
+
# regular packages
|
32
|
+
sudo apt-get install apache2-mpm-worker
|
33
|
+
sudo apt-get install libapache2-mod-qos libapache2-mod-spamhaus libapache2-mod-fastcgi libapache2-mod-evasive
|
34
|
+
sudo apt-get install curl php5-fpm php5 php5-cli php5-curl php5-gd php5-imagick php-apc php5-mysql
|
35
|
+
sudo apt-get install mysql-server mysql-client sqlite3
|
36
|
+
sudo apt-get install imagemagick
|
37
|
+
sudo apt-get install phpmyadmin
|
38
|
+
sudo apt-get install sshpass
|
39
|
+
sudo apt-get install libxml2 g++
|
40
|
+
sudo apt-get install git ruby2.1 wkhtmltopdf nodejs npm at
|
41
|
+
|
42
|
+
|
43
|
+
# -----------------------------------------------------
|
44
|
+
# Configure stuff
|
45
|
+
# -----------------------------------------------------
|
46
|
+
|
47
|
+
# php
|
48
|
+
sudo sed -i -e "s/listen = \/var\/run\/php5-fpm.sock/listen = 127.0.0.1:9000/g" /etc/php5/fpm/pool.d/www.conf
|
49
|
+
|
50
|
+
# secure mysql install
|
51
|
+
sudo mysql_secure_installation
|
52
|
+
|
53
|
+
# node
|
54
|
+
sudo ln -s /usr/bin/nodejs /usr/bin/node
|
55
|
+
|
56
|
+
# ruby
|
57
|
+
update-alternatives --set gem /usr/bin/gem2.1
|
58
|
+
update-alternatives --set ruby /usr/bin/ruby2.1
|
59
|
+
|
60
|
+
|
61
|
+
# Apache
|
62
|
+
# ------
|
63
|
+
|
64
|
+
# config modules
|
65
|
+
|
66
|
+
# php fpm
|
67
|
+
echo -e "<IfModule mod_fastcgi.c>\n AddHandler php5-fcgi .php\n Action php5-fcgi /php5-fcgi\n Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi\n FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -idle-timeout 250 -pass-header Authorization\n <Directory />\nRequire all granted\n </Directory>\n </IfModule>" | sudo tee /etc/apache2/conf-available/php-fpm.conf
|
68
|
+
sudo a2enconf php-fpm.conf
|
69
|
+
|
70
|
+
# DDoS Protection
|
71
|
+
sudo mkdir -p /var/log/apache2/evasive
|
72
|
+
sudo chown -R www-data:root /var/log/apache2/evasive
|
73
|
+
echo -e "<IfModule mod_spamhaus.c>\n DOSHashTableSize 2048\n DOSPageCount 20\n DOSSiteCount 300\n DOSPageInterval 1.0\n DOSSiteInterval 1.0\n DOSBlockingPeriod 10.0\n DOSLogDir “/var/log/apache2/evasive”\n DOSEmailNotify root@localhost\n</IfModule>" | sudo tee /etc/apache2/conf-available/mod-evasive.conf
|
74
|
+
sudo a2enconf mod-evasive.conf
|
75
|
+
|
76
|
+
# DNS Injection
|
77
|
+
sudo touch /etc/spamhaus.wl
|
78
|
+
echo -e "<IfModule mod_spamhaus.c>\n MS_METHODS POST,PUT,OPTIONS,CONNECT\n MS_WhiteList /etc/spamhaus.wl\n MS_CacheSize 256\n</IfModule>" | sudo tee /etc/apache2/conf-available/spamhaus.conf
|
79
|
+
sudo a2enconf spamhauf.conf
|
80
|
+
|
81
|
+
# enable modules
|
82
|
+
sudo a2enmod actions fastcgi alias rewrite expires headers qos spamhaus evasive cache cache_disk ssl
|
83
|
+
|
84
|
+
# phpmyadmin apache 2.4
|
85
|
+
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
|
86
|
+
sudo a2enconf phpmyadmin.conf
|
87
|
+
|
88
|
+
# -----------------------------------------------------
|
89
|
+
# Install Gems
|
90
|
+
# -----------------------------------------------------
|
91
|
+
|
92
|
+
# install some gems - yes gem1.9.3 - wtf - use rbenv
|
93
|
+
sudo gem install bundler
|
94
|
+
|
95
|
+
# install passenger
|
96
|
+
sudo gem install passenger
|
97
|
+
sudo passenger-install-apache2-module
|
98
|
+
sudo touch /etc/apache2/mods-available/passenger.load
|
99
|
+
sudo touch /etc/apache2/mods-available/passenger.confc
|
100
|
+
|
101
|
+
# -----------------------------------------------------
|
102
|
+
# Node.js related
|
103
|
+
# -----------------------------------------------------
|
104
|
+
|
105
|
+
sudo npm install bower -g
|
106
|
+
|
107
|
+
# -----------------------------------------------------
|
108
|
+
# Restart stuff
|
109
|
+
# -----------------------------------------------------
|
110
|
+
|
111
|
+
sudo service apache2 restart
|
112
|
+
sudo service php5-fpm restart
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bonethug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.92
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azt3k
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -346,6 +346,7 @@ files:
|
|
346
346
|
- scripts/ubuntu-12.04
|
347
347
|
- scripts/ubuntu-14.04
|
348
348
|
- scripts/ubuntu-14.04-dev
|
349
|
+
- scripts/ubuntu-14.04-php5.5-mod_fastcgi
|
349
350
|
- scripts/ubuntu.sh
|
350
351
|
- skel/base/.gitignore
|
351
352
|
- skel/base/Gemfile
|