-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrailway.toml
37 lines (30 loc) · 1.12 KB
/
railway.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
# https://railway.com/railway.schema.json
# https://docs.railway.com/reference/config-as-code#configurable-settings
[build]
builder = "nixpacks"
nixpacksVersion = "1.30.0"
nixpacksConfigPath = "nixpacks.toml"
[deploy]
startCommand = """
python manage.py migrate && \
python manage.py loaddata initial_data && \
python manage.py collectstatic --noinput --clear && \
gunicorn --config ./manifests/configs/gunicorn.conf.py"""
# For HealthChecking, Railway will listen port declared with PORT environmental variables,
# so need to add values 8000 as application port
healthcheckPath = "/healthz"
healthcheckTimeout = 100
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10
numReplicas = 2
# multi-regions deployment is only available with Pro plan,
# with Hobby plan, we can only configure US region
# https://docs.railway.com/reference/deployment-regions
[deploy.multiRegionConfig]
us-west2.numReplicas = 2
[environments]
pr.deploy.startCommand = """
python manage.py migrate && \
python manage.py loaddata initial_data && \
python manage.py collectstatic --noinput --clear && \
gunicorn --config ./manifests/configs/gunicorn.conf.py"""