28 lines
568 B
Bash
Executable file
28 lines
568 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
function installRuby {
|
|
rbMasto=`cat .ruby-version`
|
|
rbVersions=`rbenv versions`
|
|
|
|
# build and install ruby with jemalloc
|
|
if [[ *$rbMasto* == $rbVersions ]]; then
|
|
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install $rbMasto
|
|
fi
|
|
}
|
|
|
|
function installMastoDeps {
|
|
bundle install -j$(getconf _NPROCESSORS_ONLN)
|
|
yarn install
|
|
|
|
# setup db
|
|
bundle exec rails db:migrate
|
|
}
|
|
|
|
installRuby
|
|
installMastoDeps
|
|
|
|
# Done!
|
|
echo "Setup done! Run 'foreman start' to start sidekiq, streaming, web, and webpack
|
|
Username: admin@localhost:3000
|
|
Password: mastodonadmin"
|