forked from ValeriyMaslenikov/tg-notify-deleted-messages
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
fly.example.toml
87 lines (67 loc) · 2.05 KB
/
fly.example.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
app = "tg-notify-deleted-messages"
kill_signal = "SIGINT"
kill_timeout = 30
processes = []
swap_size_mb = 512
[env]
# Manually inject PORT variable since this is not Heroku
PORT = "8080"
# Logging levels, available values: https://docs.python.org/3/library/logging.html#levels
DEFAULT_LOGGING_LEVEL = "INFO"
ROOT_LOGGING_LEVEL = "INFO"
SQLALCHEMY_LOGGING_LEVEL = "INFO"
APP_LOGGING_LEVEL = "DEBUG"
# How many days messages will be stored in the database
# Warning: Database is not currently constrained by space, you need to monitor your free disk space manually!
MESSAGES_TTL_DAYS = "90"
# Polling interval to clean messages away
CLEAN_OLD_MESSAGES_SECONDS_INTERVAL = "900"
PRELOAD_MESSAGES_DIALOG_CONCURRENCY = "2"
PYPY_GC_MAX = "100MB" # Maybe someday
MEDIA_FILE_SIZE_THRESHOLD = "10000000"
TELETHON_OVERRIDE_MAX_CHUNK_SIZE="25"
DB_FORCE_URL_PROTOCOL = 'postgresql+psycopg'
CUSTOM_SQLALCHEMY_CONNECT_ARGS = '{"keepalives": 1, "keepalives_idle": 2, "keepalives_interval": 5, "keepalives_count": 3}'
#CUSTOM_SQLALCHEMY_CONNECT_ARGS: '{"check_same_thread": false}'
CUSTOM_SQLALCHEMY_CREATE_ENGINE_ARGS = '{"pool_size": 8, "max_overflow": 2, "pool_recycle": 300, "pool_pre_ping": true, "pool_use_lifo": false}'
[experimental]
allowed_public_ports = []
auto_rollback = true
[build]
dockerfile = "./Dockerfile"
build-target = "nginx-runner"
[deploy]
# To avoid telegram seeing two concurrent clients
strategy = "immediate"
[[services]]
internal_port = 8080
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
# No credit card if I get DDoS'd, please
hard_limit = 9999999
soft_limit = 9999999
type = "connections"
[[services.ports]]
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "30s"
interval = "60s"
restart_limit = 5
timeout = "5s"
[[services.http_checks]]
interval = "30s"
grace_period = "185s"
method = "get"
path = "/health"
protocol = "http"
restart_limit = 4
timeout = "120s"
tls_skip_verify = false
[services.http_checks.headers]
Authorization = "Bearer CHANGEMEPASSWORD"