Repository navigation
Expand file tree
/
Copy pathrailway.toml
More file actions
54 lines (52 loc) · 3.77 KB
/
Copy pathrailway.toml
File metadata and controls
54 lines (52 loc) · 3.77 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
# railway.toml — Multi-service deployment for KeyVaultAI
#
# Services defined here:
# api — Django API (gunicorn)
# celery-worker— Celery task worker (persistent daemon)
# celery-beat — Celery beat scheduler (persistent daemon)
#
# Deploy via Railway dashboard or CLI:
# railway up
#
# NOTE: All three services share the same Docker image (built from
# backend/Dockerfile). Environment variables are set per-service in the
# Railway dashboard. See docs/ENVIRONMENT_VARIABLES.md for the full list.
#
# IMPORTANT: Railway does not natively support multiple services in one
# railway.toml. This file documents the intended architecture. You must
# create each service manually in the Railway dashboard and point them all
# to the backend/Dockerfile with the respective start commands below.
#
# ┌────────────────────────────────────────────────────────────────────┐
# │ Service: api (Django + Gunicorn) │
# │ Root dir: backend/ │
# │ Start cmd: sh deploy.sh │
# │ Health: GET /api/v1/health/ → 200 │
# └────────────────────────────────────────────────────────────────────┘
#
# ┌────────────────────────────────────────────────────────────────────┐
# │ Service: celery-worker │
# │ Root dir: backend/ │
# │ Start cmd: celery -A config worker --loglevel=INFO │
# │ Health: none (Railway monitors process exit code) │
# └────────────────────────────────────────────────────────────────────┘
#
# ┌────────────────────────────────────────────────────────────────────┐
# │ Service: celery-beat │
# │ Root dir: backend/ │
# │ Start cmd: celery -A config beat --loglevel=INFO │
# │ Health: none (Railway monitors process exit code) │
# └────────────────────────────────────────────────────────────────────┘
#
# ┌────────────────────────────────────────────────────────────────────┐
# │ External Service: Redis (Upstash) │
# │ Use Upstash Redis TLS URL: rediss://... │
# │ Set REDIS_URL env var in Railway dashboard for all three services. │
# └────────────────────────────────────────────────────────────────────┘
[build]
builder = "DOCKERFILE"
dockerfilePath = "backend/Dockerfile"
[deploy]
startCommand = "sh deploy.sh"
healthcheckPath = "/api/v1/health/"
healthcheckTimeout = 30