forked from tmm1/flyapp-mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fly.toml
85 lines (74 loc) · 2.62 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
app = "starcitizen-social"
kill_signal = "SIGINT"
kill_timeout = 5
## Uncomment if you are upgrading Mastodon. See README.md for details.
# [deploy]
# release_command = "bin/rails db:migrate"
[env]
LOCAL_DOMAIN = "starcitizen.social"
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 = "starcitizen-social-redis.internal"
REDIS_PORT = "6379"
## 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_HOSTNAME="fra1.digitaloceanspaces.com"
S3_ENDPOINT="https://fra1.digitaloceanspaces.com"
S3_REGION="fra1"
S3_BUCKET="starcitizen-social-bucket"
## If you point to Fly here, uncomment the proxy in Caddyfile
S3_ALIAS_HOST="starcitizen.social"
## Sending email via SMTP also requires secrets
## named SMTP_LOGIN and SMTP_PASSWORD
SMTP_SERVER = "smtp.eu.mailgun.org"
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"
## 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 sidekiq"
# # 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
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
[[services.http_checks]]
path = "/health"
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"