-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfly.toml
More file actions
54 lines (44 loc) · 1.4 KB
/
Copy pathfly.toml
File metadata and controls
54 lines (44 loc) · 1.4 KB
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
# fly.toml app configuration file generated for paycore-api on 2025-11-07T13:09:23+01:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = 'paycore-api'
primary_region = 'ams'
console_command = '/app/manage.py shell'
[build]
[deploy]
[env]
PORT = '8000'
[processes]
app = ''
celery = 'celery -A paycore worker --loglevel=info --concurrency=2 --max-tasks-per-child=100 --prefetch-multiplier=4'
[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = false # Keep machines always running for better performance
auto_start_machines = true
min_machines_running = 1 # Always keep at least 1 machine running
processes = ['app']
# Add health checks to prevent premature restarts
[[http_service.checks]]
grace_period = "60s"
interval = "30s"
method = "GET"
path = "/api/v1/healthcheck/"
timeout = "15s"
type = "http"
# API Server - Upgraded to 2GB RAM and 2 shared CPUs
[[vm]]
memory = '2gb' # Increased from 512mb - critical for performance
cpu_kind = 'shared'
cpus = 2 # Increased from 1 - handles concurrent requests better
processes = ['app']
# Celery Worker - Upgraded to 1GB RAM
[[vm]]
memory = '1gb' # Increased from 512mb - handles background tasks better
cpu_kind = 'shared'
cpus = 1
processes = ['celery']
[[statics]]
guest_path = '/app/staticfiles'
url_prefix = '/static/'