syui 6 months ago
parent f75219183a
commit 34fed638fd
Signed by: syui
GPG Key ID: 67AC97A939D3EA19

@ -1,3 +1,34 @@
```sh
$ cp fly-example.toml fly.toml
# $app
$ fly apps create $app
$ fly scale memory 512
$ fly vol create --size 1 mastodon_uploads
# $app-redis
$ fly apps create $app-redis
$ fly vol create --size 1 -a $app-redis mastodon_redis
$ fly deploy --config fly.redis.toml --build-target redis-server
# $app-db
$ fly pg create $app-db
# DATABASE_URL
$ fly pg attach $app-db
# $app, secret
# OTP_SECRET, SECRET_KEY_BASE
$ SECRET_KEY_BASE=$(docker run --rm -it tootsuite/mastodon:latest bin/rake secret)
$ OTP_SECRET=$(docker run --rm -it tootsuite/mastodon:latest bin/rake secret)
$ fly secrets set OTP_SECRET=$OTP_SECRET SECRET_KEY_BASE=$SECRET_KEY_BASE
$ docker run --rm -e OTP_SECRET=$OTP_SECRET -e SECRET_KEY_BASE=$SECRET_KEY_BASE -it tootsuite/mastodon:latest bin/rake mastodon:webpush:generate_vapid_key | sed 's/\r//' | fly secrets import
$ vim fly.toml
# domain
$ fly certs add MYDOMAIN.COM
$ fly certs add WWW.MYDOMAIN.COM
$ fly deploy
```

@ -1,4 +1,4 @@
app = ""
app = "xxx"
kill_signal = "SIGINT"
kill_timeout = 5
@ -13,7 +13,7 @@ kill_timeout = 5
RACK_ENV = "production"
HEROKU=true
WEB_CONCURRENCY = "1"
REDIS_HOST = "mstdn-redis.internal"
REDIS_HOST = "xxx-redis.internal"
REDIS_PORT = "6379"
S3_ENABLED=false
SINGLE_USER_MODE=true

@ -1,4 +1,4 @@
app = "ms"
app = "xxx"
[deploy]
release_command = "bundle exec rails db:migrate"

@ -1,5 +1,5 @@
app = "mstdn-redis"
app = "xxx-redis"
[[mounts]]
source = "mstdn_redis"
source = "xxx_redis"
destination = "/data"

@ -1,7 +0,0 @@
app = "ms"
[deploy]
release_command = "bundle exec rails db:setup"
[env]
RAILS_ENV = "production"
Loading…
Cancel
Save