diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2019-01-07 22:49:48 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2019-01-07 22:49:48 -0200 |
commit | dbedd8e7baddd7e2efe4b28fd163b7e1d91e4c13 (patch) | |
tree | f2e687b4b758da4fe9421034d3b64f024123ec21 /share/trashman | |
parent | 597ee54caa14759e46f9f18e0338117881b75c06 (diff) | |
download | trashman-dbedd8e7baddd7e2efe4b28fd163b7e1d91e4c13.tar.gz trashman-dbedd8e7baddd7e2efe4b28fd163b7e1d91e4c13.tar.bz2 |
Adds helpy and rvm
Diffstat (limited to 'share/trashman')
-rw-r--r-- | share/trashman/helpy/info | 1 | ||||
-rwxr-xr-x | share/trashman/helpy/unix/linux/debian/install | 78 |
2 files changed, 79 insertions, 0 deletions
diff --git a/share/trashman/helpy/info b/share/trashman/helpy/info new file mode 100644 index 0000000..2150a66 --- /dev/null +++ b/share/trashman/helpy/info @@ -0,0 +1 @@ +open source customer support application diff --git a/share/trashman/helpy/unix/linux/debian/install b/share/trashman/helpy/unix/linux/debian/install new file mode 100755 index 0000000..17028cc --- /dev/null +++ b/share/trashman/helpy/unix/linux/debian/install @@ -0,0 +1,78 @@ +#!/bin/bash +# +# See https://github.com/helpyio/helpy/wiki/Installing-Helpy-on-Ubuntu-16.04-using-Passenger-and-Nginx +# https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rvm-on-debian-8 +# https://www.phusionpassenger.com/library/deploy/standalone/reverse_proxy.html + +# Parameters +#SHARE="$1" + +# Include basic functions +#. $SHARE/trashman/functions || exit 1 +#. $SHARE/trashman/debian || exit 1 + +# System setup +sudo apt-get update +sudo apt-get dist-upgrade +sudo apt-get install dirmngr +sudo apt-get install -y git-core imagemagick postgresql postgresql-contrib libpq-dev \ + curl build-essential zlib1g-dev libssl-dev libreadline-dev \ + libyaml-dev libsqlite3-dev sqlite3 libcurl4-openssl-dev \ + libxml2-dev libxslt1-dev software-properties-common nodejs \ + nginx-extras passenger + +# Database setup +sudo su postgres -c "createuser -s rails" +sudo su postgres -c "createdb helpy_production" +echo "Please set a passphrase for the rails@postgres user, then type \q..." +echo -n "\\password rails\n" | sudo su postgres -c psql + +# User setup +sudo adduser rails +sudo gpasswd -a rails sudo + +# Download RVM +#\curl -sSL https://get.rvm.io -o rvm.sh +cp $SHARE/hoarder/rvm/unix/install /home/rails/rvm.sh + +# Userland setup +sudo -u rails bash <<"EOF" +cd +gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB + +# RVM +cat rvm.sh | bash -s stable --rails +source /home/rails/.rvm/scripts/rvm + +# Other ruby dependencies +rvm install 2.3.3 +rvm requirements +rvm alias create default ruby-2.3.3 +rvm gemset create helpy +rvm 2.3.3@helpy +gem install rails --no-ri --no-rdoc -v 4.2.10 +gem install bundler + +# Helpy setup +git clone https://github.com/helpyio/helpy.git +cd helpy +bundle install +cp config/database.do.yml config/database.yml +rake secret + +# Logs +mkdir -p /home/rails/helpy/log +touch /home/rails/helpy/log/production.log +chmod 0664 /home/rails/helpy/log/production.log +EOF + +# Final steps +# Secret and db credentials setup +echo "Basic installation complete" +echo "Now you should do:" +echo "" +echo " - Secrets and db setup" +echo " - Configure the webserver" +#RAILS_ENV=production rake assets:precompile +#RAILS_ENV=production rake db:setup +#rails s -e production -b your.ip.add.ress -p 3000 |