Commit 2fc1f9d6 authored by HQ's avatar HQ
Browse files

Various improvements

parent efcf12de
......@@ -12,7 +12,7 @@ TARTARGET=
GIT=https://github.com/discourse/discourse.git
GITTARGET=/var/discourse
PREEXEC=/tmp/files/preexec.sh
DEBS=postgresql-9.5 libgdbm-dev libncurses5-dev automake libtool bison libffi-dev gawk g++ libssl-dev make zlib1g-dev libyaml-dev libsqlite3-dev sqlite3 libgmp-dev pkg-config libgmp-dev libreadline6-dev libpq-dev redis-server ruby-rmagick imagemagick optipng jhead jpegoptim gifsicle postfix software-properties-common ruby-sidekiq-cron npm
DEBS=postgresql-10 libgdbm-dev libncurses5-dev automake libtool bison libffi-dev gawk g++ libssl-dev make zlib1g-dev libyaml-dev libsqlite3-dev sqlite3 libgmp-dev pkg-config libgmp-dev libreadline6-dev libpq-dev redis-server ruby-rmagick imagemagick optipng jhead jpegoptim gifsicle postfix software-properties-common ruby-sidekiq-cron npm ruby ruby-dev
POSTEXEC=/tmp/files/postexec.sh
SERVICE=/usr/local/bin/stabile-discourse.pl
TERMINALLINK=/stabile/pipe/http://{uuid}:4200
......
#!/bin/bash
apt-add-repository -y ppa:brightbox/ruby-ng
apt-get update
apt-get -q -y --force-yes install ruby2.4 ruby2.4-dev
#apt-add-repository -y ppa:brightbox/ruby-ng
#apt-get update
#apt-get -q -y --force-yes install ruby2.4 ruby2.4-dev
cp /var/discourse/config/discourse_defaults.conf /var/discourse/config/discourse.conf
perl -pi -e 's/db_host =.*/db_host = localhost/g' /var/discourse/config/discourse.conf
......
......@@ -6,7 +6,6 @@ unless (-e '/etc/discourse.seeded') {
if (`grep ProxyPass /etc/apache2/sites-available/000-default.conf`) {
print `perl -pi -e 's/.*ProxyPass.*\\n//g' /etc/apache2/sites-available/000-default.conf`;
print `perl -pi -e 's/.*ProxyPass.*\\n//g' /etc/apache2/sites-available/default-ssl.conf`;
print `perl -pi -e 's/.*ProxyPass.*\\n//g' /etc/apache2/sites-available/000-default-le-ssl.conf`;
}
print `echo "<h1 align=center><img width=48 height=48 src=https://www.origo.io/images/apps/thumb-discourse.png> Preparing Discourse...</h1><p align=center><img src=https://www.origo.io/images/39.svg></p><script>setTimeout(function(){location.reload() ; }, 8000);</script>" > /var/www/html/index.html`;
......@@ -44,9 +43,5 @@ unless (-e '/etc/discourse.seeded') {
`systemctl restart postfix`;
`touch /etc/discourse.seeded`;
}
if (-e "/etc/apache2/sites-available/000-default-le-ssl.conf" && !(`grep ProxyPass /etc/apache2/sites-available/000-default-le-ssl.conf`)) {
print `perl -pi -e 's/(DocumentRoot .*)/\$1\\nProxyPass \\/ http:\\/\\/127.0.0.1:9292\\/\\nProxyPassReverse \\/ http:\\/\\/127.0.0.1:9292\\//g' /etc/apache2/sites-available/000-default-le-ssl.conf`;
`systemctl restart apache2`;
}
print `cd /var/discourse ; RAILS_ENV=production bundle exec puma -C config/puma.rb`;
print `cd /var/discourse ; RAILS_ENV=production bundle exec sidekiq -l log/sidekiq.log -C config/sidekiq.yml &`;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment