mastodon-docker/install.sh

31 lines
959 B
Bash

#!/bin/bash
export PATH="$HOME/.rbenv/bin:$PATH"
export RUBY_CONFIGURE_OPTS="--with-jemalloc"
git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv
cd $HOME/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $HOME/.bashrc
echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
eval "$(rbenv init -)"
rbenv install 2.6.5
rbenv global 2.6.5
gem update --system
gem install bundler --no-document
git clone https://github.com/tootsuite/mastodon.git /mastodon/app
cd /mastodon/app
# v3.0.1:
git checkout c4118ba71ba31e408c02d289e111326ccc6f6aa2
bundle config build.nokogiri --use-system-libraries
bundle install \
-j$(getconf _NPROCESSORS_ONLN) \
--deployment --without development test
yarn install --pure-lockfile --ignore-engines
OTP_SECRET=precompile_placeholder \
SECRET_KEY_BASE=precompile_placeholder \
bundle exec rails assets:precompile