Commit
·
48fbd5e
1
Parent(s):
7c4a0d7
adding the railway
Browse files- railway.json +12 -0
- render.yaml +0 -61
railway.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"$schema": "https://railway.app/railway.schema.json",
|
3 |
+
"build": {
|
4 |
+
"builder": "DOCKERFILE",
|
5 |
+
"dockerfilePath": "backend/Dockerfile"
|
6 |
+
},
|
7 |
+
"deploy": {
|
8 |
+
"startCommand": "python -m uvicorn main:app --host 0.0.0.0 --port $PORT",
|
9 |
+
"healthcheckPath": "/",
|
10 |
+
"healthcheckTimeout": 120
|
11 |
+
}
|
12 |
+
}
|
render.yaml
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
services:
|
2 |
-
# Service 1: The Redis instance for Celery
|
3 |
-
- type: redis
|
4 |
-
name: redis-cache
|
5 |
-
plan: free
|
6 |
-
# This is required for security on Render's free plan
|
7 |
-
ipAllowList: []
|
8 |
-
|
9 |
-
# Service 2: The Backend FastAPI Web Server
|
10 |
-
- type: web
|
11 |
-
name: backend-api
|
12 |
-
plan: free
|
13 |
-
env: docker
|
14 |
-
dockerfilePath: ./backend/Dockerfile
|
15 |
-
dockerContext: .
|
16 |
-
# Render's free web services listen on port 10000
|
17 |
-
healthCheckPath: /
|
18 |
-
envVars:
|
19 |
-
- key: DATABASE_URL
|
20 |
-
fromDatabase:
|
21 |
-
name: neon-database # We will create this name in the next step
|
22 |
-
property: connectionString
|
23 |
-
- key: CELERY_BROKER_URL
|
24 |
-
fromService:
|
25 |
-
type: redis
|
26 |
-
name: redis-cache
|
27 |
-
property: connectionString
|
28 |
-
- key: CELERY_RESULT_BACKEND
|
29 |
-
fromService:
|
30 |
-
type: redis
|
31 |
-
name: redis-cache
|
32 |
-
property: connectionString
|
33 |
-
- key: GOOGLE_API_KEY
|
34 |
-
sync: false # We will set this secret manually in the UI
|
35 |
-
|
36 |
-
# Service 3: The Celery Background Worker
|
37 |
-
- type: worker
|
38 |
-
name: celery-worker
|
39 |
-
plan: free
|
40 |
-
env: docker
|
41 |
-
dockerfilePath: ./backend/Dockerfile
|
42 |
-
dockerContext: .
|
43 |
-
# This command overrides the CMD in the Dockerfile to start the worker
|
44 |
-
dockerCommand: "python -m celery -A celery_worker.celery worker --loglevel=info"
|
45 |
-
envVars:
|
46 |
-
- key: DATABASE_URL
|
47 |
-
fromDatabase:
|
48 |
-
name: neon-database # We will create this name in the next step
|
49 |
-
property: connectionString
|
50 |
-
- key: CELERY_BROKER_URL
|
51 |
-
fromService:
|
52 |
-
type: redis
|
53 |
-
name: redis-cache
|
54 |
-
property: connectionString
|
55 |
-
- key: CELERY_RESULT_BACKEND
|
56 |
-
fromService:
|
57 |
-
type: redis
|
58 |
-
name: redis-cache
|
59 |
-
property: connectionString
|
60 |
-
- key: GOOGLE_API_KEY
|
61 |
-
sync: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|