Fix setup script
This commit is contained in:
parent
07d2614a28
commit
ea2f390457
3 changed files with 56 additions and 6 deletions
|
@ -29,15 +29,10 @@ su - mastodon << EOF
|
||||||
git clone https://github.com/rbenv/rbenv.git /home/mastodon/.rbenv
|
git clone https://github.com/rbenv/rbenv.git /home/mastodon/.rbenv
|
||||||
cd /home/mastodon/.rbenv && src/configure && make -C src
|
cd /home/mastodon/.rbenv && src/configure && make -C src
|
||||||
echo 'export PATH="/home/mastodon/.rbenv/bin:$PATH"' >> /home/mastodon/.bashrc
|
echo 'export PATH="/home/mastodon/.rbenv/bin:$PATH"' >> /home/mastodon/.bashrc
|
||||||
echo 'eval "$(rbenv init -)"' >> /home/mastodon/.bashrc
|
echo 'eval "\$(rbenv init -)"' >> /home/mastodon/.bashrc
|
||||||
exec bash
|
exec bash
|
||||||
git clone https://github.com/rbenv/ruby-build.git /home/mastodon/.rbenv/plugins/ruby-build
|
git clone https://github.com/rbenv/ruby-build.git /home/mastodon/.rbenv/plugins/ruby-build
|
||||||
|
|
||||||
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.2.2
|
|
||||||
rbenv global 3.2.2
|
|
||||||
|
|
||||||
gem install bundler --no-document
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo -u postgres psql << EOF
|
sudo -u postgres psql << EOF
|
||||||
|
@ -50,9 +45,26 @@ git clone https://github.com/kmycode/mastodon.git live && cd live
|
||||||
git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
|
git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
|
||||||
yarn install --pure-lockfile
|
yarn install --pure-lockfile
|
||||||
|
|
||||||
|
chmod 0777 install/setup2.sh
|
||||||
|
chmod 0777 install/update.sh
|
||||||
|
|
||||||
|
ln -s install/setup2.sh /home/mastodon/setup2
|
||||||
|
ln -s install/update.sh /home/mastodon/update
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
chmod o+x /home/mastodon
|
||||||
cp /home/mastodon/live/dist/nginx.conf /etc/nginx/sites-available/mastodon
|
cp /home/mastodon/live/dist/nginx.conf /etc/nginx/sites-available/mastodon
|
||||||
ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
|
ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
|
||||||
cp /home/mastodon/live/dist/mastodon-*.service /etc/systemd/system/
|
cp /home/mastodon/live/dist/mastodon-*.service /etc/systemd/system/
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
echo << EOF
|
||||||
|
|
||||||
|
============== [kmyblue setup script 1 completed] ================
|
||||||
|
|
||||||
|
Input this command to continue setup:
|
||||||
|
sudo su - mastodon
|
||||||
|
cd live
|
||||||
|
install/setup2.sh
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.2.2
|
||||||
|
rbenv global 3.2.2
|
||||||
|
|
||||||
|
gem install bundler --no-document
|
||||||
|
|
||||||
|
bundle config deployment 'true'
|
||||||
|
bundle config without 'development test'
|
||||||
|
bundle install -j$(getconf _NPROCESSORS_ONLN)
|
||||||
|
|
||||||
|
unlink /home/mastodon/setup2
|
||||||
|
|
||||||
|
echo << EOF
|
||||||
|
|
||||||
|
============== [kmyblue setup script 2 completed] ================
|
||||||
|
|
||||||
|
Input this command to finish setup:
|
||||||
|
RAILS_ENV=production bundle exec rake mastodon:setup
|
||||||
|
|
||||||
|
If you update kmyblue version, use following:
|
||||||
|
/home/mastodon/update
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
# パスワード変更
|
||||||
|
# sudo -u postgres psql << EOF
|
||||||
|
# ALTER USER mastodon WITH PASSWORD 'ohagi';
|
||||||
|
# EOF
|
||||||
|
|
||||||
|
# サーバー設定変更
|
||||||
|
# sudo vi /etc/nginx/sites-available/mastodon
|
||||||
|
|
||||||
|
# サーバー起動・OS起動時自動起動設定
|
||||||
|
# systemctl enable --now mastodon-web mastodon-sidekiq mastodon-streaming
|
4
install/update.sh
Normal file
4
install/update.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
git stash
|
||||||
|
|
||||||
|
git fetch
|
||||||
|
git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
|
Loading…
Add table
Add a link
Reference in a new issue