From 56c48a47324ffb851fb73654c0fc52049fae5b31 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Sun, 9 Apr 2017 16:32:12 +0200 Subject: [PATCH] Update install --- conf/mastodon-sidekiq.service | 1 + conf/mastodon-streaming.service | 1 + conf/mastodon-web.service | 1 + conf/nginx.conf | 7 ++----- scripts/install | 23 ++++++++++++++--------- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/conf/mastodon-sidekiq.service b/conf/mastodon-sidekiq.service index d31fed4..c0a24c8 100644 --- a/conf/mastodon-sidekiq.service +++ b/conf/mastodon-sidekiq.service @@ -11,6 +11,7 @@ ExecStart=/opt/mastodon/.rbenv/shims/bundle exec sidekiq -c 5 -q default -q mailers -q pull -q push TimeoutSec=15 Restart=always + StandardError=syslog [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/conf/mastodon-streaming.service b/conf/mastodon-streaming.service index 1a5be2c..1716b00 100644 --- a/conf/mastodon-streaming.service +++ b/conf/mastodon-streaming.service @@ -11,6 +11,7 @@ ExecStart=/usr/bin/npm run start TimeoutSec=15 Restart=always + StandardError=syslog [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/conf/mastodon-web.service b/conf/mastodon-web.service index 9f1d710..4632031 100644 --- a/conf/mastodon-web.service +++ b/conf/mastodon-web.service @@ -11,6 +11,7 @@ ExecStart=/opt/mastodon/.rbenv/shims/bundle exec puma -C config/puma.rb TimeoutSec=15 Restart=always + StandardError=syslog [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 19650dd..a6769a7 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -13,7 +13,7 @@ proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; + proxy_set_header Connection "upgrade"; tcp_nodelay on; } @@ -27,9 +27,6 @@ proxy_redirect off; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; + proxy_set_header Connection "upgrade"; tcp_nodelay on; - } - - error_page 500 501 502 503 504 /500.html; } \ No newline at end of file diff --git a/scripts/install b/scripts/install index 174fc42..e73ad27 100644 --- a/scripts/install +++ b/scripts/install @@ -72,13 +72,12 @@ dbuser=$app # Generate random password dbpass=$(ynh_string_random) ynh_psql_create_db "$dbname" "$dbuser" "$dbpass" -# sudo su -c "psql" postgres <<< \ -# "CREATE EXTENSION mastodon;" # Download all Ruby source sudo git clone https://github.com/rbenv/rbenv.git $final_path/.rbenv git clone https://github.com/rbenv/ruby-build.git $final_path/.rbenv/plugins/ruby-build git clone https://github.com/tootsuite/mastodon.git $final_path/live +git clone git://github.com/dcarley/rbenv-sudo.git $final_path/.rbenv/plugins/rbenv-sudo sudo chown -R $app: "${final_path}" # Install de rbenv @@ -96,11 +95,14 @@ sudo su - $app <