Skip to content

Instantly share code, notes, and snippets.

#いつものごとくMastodonを一旦止める
systemctl stop mastodon-{web,sidekiq,streaming}.service
#リリースノートに書いてある Node.js 8 を入れる
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt update && sudo apt install nodejs
#リリースノートに書いてある nginx のサイズを上げる
nano /etc/nginx/sites-available/example.com.conf
↑この場所は各自設置しているファイルの場所を指定
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
</CORSRule>
</CORSConfiguration>
# Optional alias for S3 (e.g. to serve files on a custom domain, possibly using Cloudfront or Cloudflare)
S3_CLOUDFRONT_HOST=media.mydomain.com ←ここに自分の設定した Cloudflare の CNAME 入れる
ちなみに
S3_ALIAS_HOSTNAME=media.mydomain.com ←最新の.env.productionにはこう書かれててこれでもいける。これのほうが良いかも。
su - #kusanagi ユーザから root へ
kusanagi ssl --email <自分のメールアドレス>
#上のコマンドだけで設定が始まる
<中略>
#ずらずらいろいろとインストールや結果が出て
<中略>
- Congratulations! Your certificate and chain have been saved at:
#Mastodonを止める
systemctl stop mastodon-{web,sidekiq,streaming}.service
#Mastodonユーザになる
sudo su - mastodon
#Mastodonのおいてあるディレクトリに移る
cd ~/live
#git fetchで最新のデータを引いてくる
#Mastodonのおいてあるディレクトリに移る
cd ~/live
#マスターに移り、最新版を持ってくる
git checkout master
git pull
git checkout v2.2.0
#いつものようにインストール作業をする
gem install bundler
#Mastodonユーザになる
sudo su - mastodon
#Mastodonのおいてあるディレクトリに移る
cd ~/live
#マスターに移り、最新版を持ってくる
git checkout master
git pull
git checkout v2.2.0
$ cd /home/mastodon/live
$ mv yarn.lock ../ (うちではyarn.lockファイルをどかさないとgem install bundlerできないので、普通にできる人はやらなくていいです)
$ git branch
$ git checkout master
$ git pull
$ git checkout v2.0.0
$ gem install bundler
$ bundle install --deployment --without development test
#Mastodon を止める
systemctl stop mastodon-{web,sidekiq,streaming}.service
#Mastodon ユーザになる
sudo su - mastodon
#今回の Ruby 2.6.0 のアップデートをするためにrbenvのおいてあるディレクトリに移り最新版をダウンロード
cd ~/.rbenv
git pull
@momoseijin
momoseijin / keybase.md
Last active April 5, 2019 10:10
Keybase.md

Keybase proof

I hereby claim:

  • I am momoseijin on github.
  • I am momoseijin (https://keybase.io/momoseijin) on keybase.
  • I have a public key ASCdUT5TvUqsCH2XCLd2EWhnUx6SaYCpHo2MPi4g-x4pvwo

To claim this, I am signing this object: