Create a do ubuntu 16.04 droplet.
Then, follow instructions for initial setup: https://ja.cat/ub1604
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.5.1
rbenv global 2.5.1
ruby -v
echo "gem: --no-document" >> ~/.gemrc
gem install bundler
rbenv rehash
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
sudo apt-get install -y apt-transport-https ca-certificates
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger xenial main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update
sudo apt-get install -y nginx-extras passenger
sudo vim /etc/nginx/nginx.conf
Find the following lines, and uncomment them:
#include /etc/nginx/passenger.conf;
Save and close nginx.conf.
sudo vim /etc/nginx/passenger.conf
And change the passenger_ruby line to point to your ruby executable:
passenger_ruby /home/<your_user>/.rbenv/shims/ruby;
#passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
#passenger_ruby /usr/bin/passenger_free_ruby;
save and close passenger.conf
sudo apt-get install -y postgresql libpq-dev postgresql-contrib
add user and password. Change thepassword by your password
sudo -u postgres psql -c "CREATE USER decidim_app WITH SUPERUSER CREATEDB NOCREATEROLE PASSWORD 'thepassword'"
needed for decidim-iniciatives
sudo -i -u postgres
psql
CREATE EXTENSION pg_trgm;
\q
exit
sudo apt-get install checkinstall
sudo apt-get build-dep imagemagick -y
sudo wget http://www.imagemagick.org/download/ImageMagick.tar.gz
sudo tar xzvf ImageMagick.tar.gz
cd ImageMagick-7.****
sudo ./configure
sudo make clean
sudo make
sudo checkinstall
sudo ldconfig /usr/local/lib
git clone https://github.com/decidim/decidim
cd decidim
bundle install
Instructions to use figaro as explained here (https://github.com/decidim/decidim/blob/master/docs/manual-installation.md#configure-the-database) don’t work. The only way to make it work is by hardcoding the database details, including username and password, within this file: https://github.com/decidim/decidim/blob/master/decidim-generators/lib/decidim/generators/app_templates/database.yml.erb
bin/rake development_app
bundle exec decidim-generators/exe/decidim production_app
In either case, you can boot the generated application by moving to it (cd development_app or cd production_app), and booting rails (bin/rails s). To access the apps, open localhost:3000 in your browser. If you create a production application, note that you won’t have any test users.