Recopie initiale
This commit is contained in:
49
files/Install-Mastodon-Phase4.sh
Normal file
49
files/Install-Mastodon-Phase4.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
# Let's install ruby 2.5.0
|
||||
echo Phase 4: Installation de Ruby
|
||||
rm -rf $HOME/.rbenv/plugins/ruby-build 2>/dev/null
|
||||
git clone https://github.com/rbenv/ruby-build.git $HOME/.rbenv/plugins/ruby-build || exit 301
|
||||
cd $HOME/.rbenv || exit 302
|
||||
rbenv install 2.5.0 || exit 303
|
||||
rbenv global 2.5.0 || exit 304
|
||||
ruby -v
|
||||
|
||||
cd
|
||||
git clone https://github.com/tootsuite/mastodon.git live || exit 305
|
||||
cd live || exit 306
|
||||
git checkout $(git tag | tail -n 1) || exit 307
|
||||
|
||||
echo "gem: --no-document" > ~/.gemrc || exit 308
|
||||
gem install bundler --no-ri || exit 309
|
||||
|
||||
echo Launch the installation
|
||||
bundle install --deployment --without development test || exit 310
|
||||
yarn install || exit 311
|
||||
|
||||
cp .env.production.sample .env.production || exit 312
|
||||
|
||||
echo "# Service dependencies" >>.env.production
|
||||
echo REDIS_HOST=localhost >>.env.production
|
||||
echo REDIS_PORT=6379 >>.env.production
|
||||
echo DB_HOST=/var/run/postgresql >>.env.production
|
||||
echo DB_USER=mastodon >>.env.production
|
||||
echo DB_NAME=mastodon_production >>.env.production
|
||||
echo DB_PASS= >>.env.production
|
||||
echo DB_PORT=5432 >>.env.production
|
||||
|
||||
echo "# E-mail configuration" >>.env.production
|
||||
echo SMTP_SERVER=smtp.mailgun.org >>.env.production
|
||||
echo SMTP_PORT=587 >>.env.production
|
||||
echo SMTP_LOGIN=postmaster@mg.familleclement.space >>.env.production
|
||||
echo SMTP_PASSWORD=cbac685af990620014a4455522bb8e0e-db1f97ba-6379cdaa >>.env.production
|
||||
echo SMTP_FROM_ADDRESS=noreply@mastodon.lescorpsdereve.space >>.env.production
|
||||
|
||||
echo "# Federation" >>.env.production
|
||||
echo LOCAL_DOMAIN=mastodon.lescorpsdereve.space >>.env.production
|
||||
echo LOCAL_HTTPS=false >>.env.production
|
||||
|
||||
RAILS_ENV=production bundle exec rails db:setup || exit 313
|
||||
RAILS_ENV=production bundle exec rails assets:precompile || exit 314
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user