-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfly.toml
More file actions
63 lines (54 loc) · 1.5 KB
/
fly.toml
File metadata and controls
63 lines (54 loc) · 1.5 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
55
56
57
58
59
60
61
62
63
# Fly.io Configuration for TrustCheck
# https://fly.io/docs/reference/configuration/
#
# Deploy with:
# fly launch --name trustcheck-app
# fly secrets set DATABASE_URL="postgresql+asyncpg://...neon-url..."
# fly deploy
# fly ssh console -C "alembic upgrade head"
app = "trustcheck-sanctions"
primary_region = "iad" # US East - choose closest to your Neon region
[build]
dockerfile = "Dockerfile"
[env]
ENVIRONMENT = "production"
LOG_LEVEL = "INFO"
PYTHONUNBUFFERED = "1"
# DATABASE_URL is set via secrets (fly secrets set DATABASE_URL="...")
# Pool settings optimized for serverless PostgreSQL (Neon)
DB_POOL_SIZE = "5"
DB_POOL_MAX_OVERFLOW = "10"
# Screening settings
DEFAULT_MATCH_THRESHOLD = "0.80"
BATCH_SCREENING_LIMIT = "10000"
# Scraping intervals
OFAC_INTERVAL_HOURS = "6"
UN_INTERVAL_HOURS = "24"
EU_INTERVAL_HOURS = "24"
UK_INTERVAL_HOURS = "24"
[http_service]
internal_port = 8000
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
[http_service.concurrency]
type = "requests"
hard_limit = 100
soft_limit = 80
[[http_service.checks]]
interval = "30s"
timeout = "10s"
grace_period = "30s"
method = "GET"
path = "/health"
# Machine configuration (free tier compatible)
[[vm]]
memory = "512mb"
cpu_kind = "shared"
cpus = 1
[deploy]
release_command = "alembic upgrade head"
[processes]
app = "python -m trustcheck.main serve --host 0.0.0.0 --port 8000"