-
Notifications
You must be signed in to change notification settings - Fork 37
/
fly.toml
92 lines (80 loc) · 2.77 KB
/
fly.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
app = "mastodon-example"
primary_region = "sjc"
kill_signal = "SIGINT"
kill_timeout = "5s"
## Uncomment if you are upgrading Mastodon. See README.md for details.
# [deploy]
# release_command = "bin/rails db:migrate"
[env]
LOCAL_DOMAIN = "mastodon-example.fly.dev"
WEB_CONCURRENCY = "0" # exactly 1 Puma process
OVERMIND_FORMATION = "sidekiq=1" # exactly 1 sidekiq process
MALLOC_ARENA_MAX = "2"
MAX_THREADS = "5"
RAILS_ENV = "production"
RAILS_LOG_TO_STDOUT = "enabled"
RAILS_SERVE_STATIC_FILES = "false"
REDIS_HOST = "mastodon-example-redis.internal"
REDIS_PORT = "6379"
REDIS_URL = "redis://mastodon-example-redis.internal:6379/?family=6"
## Storage on S3 also requires secrets named AWS_ACCESS_KEY_ID and
## AWS_SECRET_ACCESS_KEY. If you use this, remove [mounts] below.
# S3_ENABLED=true
# S3_BUCKET=mastodon-example-bucket
## If you point to Fly here, uncomment the proxy in Caddyfile
# S3_ALIAS_HOST=mastodon-example.fly.dev
## Sending email via SMTP also requires secrets
## named SMTP_LOGIN and SMTP_PASSWORD
# SMTP_SERVER = "smtp.postmarkapp.com"
# SMTP_PORT = "587"
# SMTP_ENABLE_STARTTLS = "always"
# SMTP_FROM_ADDRESS = "[email protected]"
## Comment out this section if you use cloud storage
[mounts]
source = "mastodon_uploads"
destination = "/opt/mastodon/public/system"
processes = ["app"]
## If you uncomment this to scale up to more VMs,
## - Remove the entire [mounts] section above
## - Remove the OVERMIND_FORMATION env line above
## - Uncomment `processes = ["rails"]` below in [[services]]
# [processes]
# # If you need more web server workers, scale up this group
# # by running `fly scale count rails=N
# rails = "./overmind start -x rails"
# # If you need to run more sidekiq workers, scale up this group
# # by running `fly scale count N --group sidekiq`
# sidekiq = "bash -c 'bundle exec sidekiq -c $MAX_THREADS -q default,8 -q push,6 -q ingress,4 -q mailers,2 -q pull'"
# # The schedule queue can only ever have one worker process at a time
# # by running fly scale count 1 --group schedule
# schedule = "bash -c 'bundle exec sidekiq -c $MAX_THREADS'"
[[statics]]
guest_path = "/opt/mastodon/public"
url_prefix = "/"
[[services]]
# processes = ["rails"]
internal_port = 8080
protocol = "tcp"
[[services.ports]]
handlers = ["http"]
port = 80
force_https = true
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[services.concurrency]
type = "connections"
hard_limit = 25
soft_limit = 20
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
timeout = "2s"
tls_skip_verify = false
[[services.http_checks]]
method = "get"
protocol = "http"
path = "/health"
grace_period = "1s"
interval = "15s"
timeout = "2s"