forked from publiclab/mapknitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_cloud.sh
executable file
·28 lines (28 loc) · 1.2 KB
/
install_cloud.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
git checkout -b main
git pull -f origin main
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash
source ~/.rvm/scripts/rvm
rvm install ruby-2.4.6
source $(rvm 2.4.6 do rvm env --path)
rvm use ruby-2.4.6
gem install rails -v 4.2.11.1
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server
sudo apt-get -y install bundler libmysqlclient-dev imagemagick ruby-rmagick libfreeimage3 libfreeimage-dev ruby-dev libmagickcore-dev libmagickwand-dev npm nodejs-legacy
# exporter-only:
#sudo apt-get install gdal-bin python-gdal curl libcurl4-openssl-dev libssl-dev zip
gem install bundler
bundle install
cp db/schema.rb.example db/schema.rb
cp config/database.yml.cloud9.example config/database.yml
cp config/config.yml.example config/config.yml
sudo service mysql start
bin/rake db:migrate RAILS_ENV=development
rake db:setup
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get update && sudo apt-get install yarn
sudo npm install -g yarn
sudo yarn install
echo "Done! Run the application with 'rails server -b 0.0.0.0'"