diff --git a/chef/cookbooks/centos/recipes/bootstrap.rb b/chef/cookbooks/centos/recipes/bootstrap.rb index 0458df3fa898f3ee6e215a11c0f719299af00352..3e6c6101724b35c3d97a9fb8aa6449c1c0c58156 100644 --- a/chef/cookbooks/centos/recipes/bootstrap.rb +++ b/chef/cookbooks/centos/recipes/bootstrap.rb @@ -19,6 +19,9 @@ end execute "rvm deps" do command "yum install -y bzip2" end +execute "install mysql" do + command "yum install -y mysql mysql-server mysql-devel" +end def harden_ruby(ruby_string) Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file| diff --git a/chef/cookbooks/common/files/default/thins.yml b/chef/cookbooks/common/files/default/thins.yml index 37ec634b3bdce17023d47b13e1a98d8572ffd4a2..f0b18cdd6e23fec57c9b19e82045545f5b069a63 100644 --- a/chef/cookbooks/common/files/default/thins.yml +++ b/chef/cookbooks/common/files/default/thins.yml @@ -6,4 +6,4 @@ url: 'joindiaspora.com' cert_location: '/usr/local/nginx/conf/diaspora.crt' key_location: '/usr/local/nginx/conf/diaspora.key' s3_bucket: "https://joindiaspora.s3.amazonaws.com" -s3_path: "/uploads/images/' +s3_path: "/uploads/images/" diff --git a/chef/cookbooks/common/recipes/daemontools.rb b/chef/cookbooks/common/recipes/daemontools.rb index f5254a4bc0f645f3aaa60b5cf070479ba75443ef..4f1509b65e49e86ddceeaab0b0020a7944973b56 100644 --- a/chef/cookbooks/common/recipes/daemontools.rb +++ b/chef/cookbooks/common/recipes/daemontools.rb @@ -6,11 +6,18 @@ execute "compile daemontools" do command "cd /package/admin/daemontools-0.76 && ./package/install" end -execute "mongo run" do - command "mkdir -p /service/mongo && echo '#!/bin/sh' > /service/mongo/run && echo 'exec /usr/bin/mongod' >> /service/mongo/run" +#execute "mongo run" do +# command "mkdir -p /service/mongo && echo '#!/bin/sh' > /service/mongo/run && echo 'exec /usr/bin/mongod' >> /service/mongo/run" +#end +#execute "executable" do +# command "chmod -R 755 /service/mongo" +#end + +execute "mysql run" do + command "mkdir -p /service/mysql && echo '#!/bin/sh' > /service/mysql/run && echo 'exec /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --user=mysql' >> /service/mysql/run" end execute "executable" do - command "chmod -R 755 /service/mongo" + command "chmod -R 755 /service/mysql" end config = YAML.load_file("/usr/local/app/diaspora/chef/cookbooks/common/files/default/thins.yml") diff --git a/chef/cookbooks/common/templates/default/nginx.conf.erb b/chef/cookbooks/common/templates/default/nginx.conf.erb index e5dee7afa8471801d4fb07bdaf464f31d37c6c37..cc34eba51e394db1131dd556bfca6fdd3447a666 100644 --- a/chef/cookbooks/common/templates/default/nginx.conf.erb +++ b/chef/cookbooks/common/templates/default/nginx.conf.erb @@ -90,7 +90,7 @@ http { location /assets { expires 1d; - add_header Cache-Control public + add_header Cache-Control public; } location / { @@ -114,7 +114,7 @@ http { } <% unless @s3_bucket.blank? || @s3_path.blank? %> - <%= "rewrite ^/uploads/images/(.*)$ #{@s3_bucket}#{@s3_path}$1 permanent; %> + <%= "rewrite ^/uploads/images/(.*)$ #{@s3_bucket}#{@s3_path}$1 permanent;" %> <% end %> }