-
Notifications
You must be signed in to change notification settings - Fork 3
/
fly.example.toml
92 lines (80 loc) · 2.18 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
88
89
90
91
92
app = 'django_react_starter'
primary_region = 'cdg'
console_command = '/home/app/backend/manage.py shell'
[build]
dockerfile = 'docker/prod/Dockerfile'
ignorefile = '.dockerignore'
[deploy]
strategy = 'rolling'
[env]
DJANGO_SETTINGS_MODULE = 'django_react_starter.settings.production'
ENVIRONMENT = 'production'
FLY_VOLUME_DIR = '/home/app/data' # like the mount destination
HOST_DNS_NAMES = 'django_react_starter.fly.dev,django_react_starter.jkdev.app'
INTERNAL_IPS = '172.19.4.106' # Add prometheus internal IP (check sentry error on first boot)
GUNICORN_WORKERS = '1'
PORT = '8000'
MEILISEARCH_HOST = 'https://meilisearch.jkdev.app' # Must use public hostname
CELERY_WORKERS = '1'
RABBITMQ_HOSTNAME = '[fdaa:1:a00d:a7b:10f:e769:75cf:2]' # Must use private ipv6 hostname within brackets
RABBITMQ_PORT = '5672'
RABBITMQ_ADMIN_URL = 'https://rabbitmq.jkdev.app'
# >>> Secrets (fly secrets list) <<<
# DATABASE_URL
# DEFAULT_FROM_EMAIL
# DJANGO_SUPERUSER_EMAIL
# DJANGO_SUPERUSER_PASSWORD
# MEILISEARCH_API_KEY
# RABBITMQ_USERNAME
# RABBITMQ_PASSWORD
# SECRET_KEY
# SENTRY_DSN
# >>> Generated during GitHub actions <<<
# APP_VERSION
[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 1
processes = ['app']
[[http_service.checks]]
grace_period = "15s"
interval = "60s"
method = "GET"
timeout = "5s"
path = "/api/v1/health/api/"
[[http_service.checks]]
grace_period = "15s"
interval = "60s"
method = "GET"
timeout = "5s"
path = "/api/v1/health/database/"
[[http_service.checks]]
grace_period = "15s"
interval = "60s"
method = "GET"
timeout = "5s"
path = "/api/v1/health/rabbitmq/"
[[http_service.checks]]
grace_period = "15s"
interval = "60s"
method = "GET"
timeout = "5s"
path = "/api/v1/health/celery/"
[[http_service.checks]]
grace_period = "15s"
interval = "60s"
method = "GET"
timeout = "5s"
path = "/api/v1/health/meilisearch/"
[[vm]]
cpu_kind = 'shared'
cpus = 1
memory_mb = 512
[mounts]
source = 'django_react_starter_data'
destination = '/home/app/data'
[metrics]
port = 8000
path = "/metrics"