47 lines
921 B
Bash
47 lines
921 B
Bash
#!/bin/bash
|
|
|
|
export HOME=/root
|
|
|
|
set -e
|
|
set -x
|
|
|
|
apt-get -yqq update
|
|
|
|
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
|
|
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
|
|
curl -sSL https://get.rvm.io | bash -s stable
|
|
echo 'gem: --no-document' >> ~/.gemrc
|
|
|
|
set +e
|
|
set +x
|
|
source /etc/profile.d/rvm.sh
|
|
rvm install 2.6.2
|
|
rvm --default use 2.6.2
|
|
set -e
|
|
set -x
|
|
|
|
gem install bundler mailcatcher rake
|
|
|
|
|
|
# install pg10
|
|
# ubuntu has a bootstrap script for pg repo install:
|
|
apt install -y postgresql-common
|
|
sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
|
|
|
|
apt-get update
|
|
apt-get install postgresql-10 pgadmin4
|
|
|
|
# start postgres somehow
|
|
sudo -u postgres -i
|
|
createuser --superuser -Upostgres discourse
|
|
psql -c "ALTER USER discourse WITH PASSWORD 'password';"
|
|
|
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
|
|
|
|
# FIXME activate nvm
|
|
|
|
find $HOME
|
|
exit 1
|
|
|
|
chmod +x /etc/service/*/run
|