diff --git a/provision_server.sh b/provision_server.sh new file mode 100644 index 00000000..540f3a16 --- /dev/null +++ b/provision_server.sh @@ -0,0 +1,155 @@ +#!/bin/bash +# rvm/rails installation from https://gorails.com/setup/ubuntu/14.04 +# passenger installation from https://www.phusionpassenger.com/library/install/nginx/install/oss/trusty/ + +######## VERSION INFORMATION ######## + +postgres_version=12 +node_version=12 +ruby_version=2.7.0 +rails_version=5.2.4.1 +geckodriver_version=0.26.0 + +########## INSTALL SCRIPT ########### + +# codeocean user +sudo adduser codeocean +usermod -a -G rvm codeocean +usermod -a -G docker codeocean + +# PostgreSQL +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - +sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -sc)-pgdg main" + +# drop postgres access control +# tee /etc/postgresql/$postgres_version/main/pg_hba.conf <