Created
April 29, 2017 16:52
-
-
Save esetomo/7993076bf186aa116df3f97f919bc783 to your computer and use it in GitHub Desktop.
MastodonでConoHaさんのオブジェクトストレージを使う設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SWIFT_ENABLED=true | |
SWIFT_USERNAME=gncuなんとか | |
SWIFT_TENANT=gnctなんとか | |
SWIFT_PASSWORD=[APIパスワード] | |
SWIFT_AUTH_URL=https://identity.tyo1.conoha.io/v2.0/tokens | |
SWIFT_CONTAINER=mayodon | |
SWIFT_OBJECT_URL=https://media.s-tomo.jp/mayodon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/tootsuite/mastodon/pull/2322 を取り込む | |
$ git remote add moosetodon https://github.com/Moosetodon/mastodon.git | |
$ git fetch moosetodon | |
$ git cherry-pick bde8875143aed92d5cbe83b4ce21840a8631b8c3 | |
ガイドに従ってコンテナ作成 | |
https://www.conoha.jp/guide/objectstorageswift.php | |
認証なしで取得できるようにする | |
$ swift post -r '.r:*' container | |
.env.production に設定を書く | |
(AUTH_URLには設定情報に挙げられているものの後ろに「/tokens」の追加が必要) | |
公開URLが長いのでnginxにリバースプロキシ設定 | |
(Production-guideのものを流用したらproxy_set_headerあたりが余計っぽくてストレージ側のnginxが404になったので削りました。) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name media.s-tomo.jp; | |
ssl_protocols TLSv1.2; | |
ssl_ciphers EECDH+AESGCM:EECDH+AES; | |
ssl_ecdh_curve prime256v1; | |
ssl_prefer_server_ciphers on; | |
ssl_session_cache shared:SSL:10m; | |
ssl_certificate /etc/letsencrypt/live/media.s-tomo.jp/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/media.s-tomo.jp/privkey.pem; | |
root /home/mastodon/app/current/public; | |
location /mayodon/ { | |
proxy_pass https://object-storage.tyo1.conoha.io/v1/nc_3d1855fdbb7e4799b7431d308bd087fa/mayodon/; | |
proxy_buffering off; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
tcp_nodelay on; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment