Spaces:
Sleeping

MicroFunnel commited on
Commit
777d07b
·
1 Parent(s): 862b693

Fix: Use Nixpacks Python provider instead of manual setup

Browse files
Files changed (3) hide show
  1. Procfile +1 -1
  2. nixpacks.toml +7 -8
  3. railway.json +1 -1
Procfile CHANGED
@@ -1 +1 @@
1
- web: cd backend && python3.9 -m uvicorn app.main:app --host 0.0.0.0 --port $PORT
 
1
+ web: cd backend && uvicorn app.main:app --host 0.0.0.0 --port $PORT
nixpacks.toml CHANGED
@@ -1,13 +1,12 @@
1
- # Railway Nixpacks Configuration
2
  [phases.setup]
3
- nixPkgs = ["python39", "python39Packages.pip", "python39Packages.setuptools", "postgresql"]
4
- nixLibs = ["zlib"]
5
 
6
  [phases.install]
7
- cmds = ["cd backend", "python3.9 -m pip install --upgrade pip", "python3.9 -m pip install -r requirements.txt"]
8
-
9
- [phases.build]
10
- cmds = ["echo 'Build phase complete'"]
11
 
12
  [start]
13
- cmd = "cd backend && python3.9 -m uvicorn app.main:app --host 0.0.0.0 --port $PORT"
 
1
+ # Railway Nixpacks Configuration for Python
2
  [phases.setup]
3
+ providers = ["python"]
 
4
 
5
  [phases.install]
6
+ cmds = [
7
+ "pip install --upgrade pip",
8
+ "pip install -r backend/requirements.txt"
9
+ ]
10
 
11
  [start]
12
+ cmd = "cd backend && uvicorn app.main:app --host 0.0.0.0 --port $PORT"
railway.json CHANGED
@@ -5,7 +5,7 @@
5
  "nixpacksConfigPath": "nixpacks.toml"
6
  },
7
  "deploy": {
8
- "startCommand": "cd backend && python3.9 -m uvicorn app.main:app --host 0.0.0.0 --port $PORT",
9
  "restartPolicyType": "ON_FAILURE",
10
  "restartPolicyMaxRetries": 10
11
  }
 
5
  "nixpacksConfigPath": "nixpacks.toml"
6
  },
7
  "deploy": {
8
+ "startCommand": "cd backend && uvicorn app.main:app --host 0.0.0.0 --port $PORT",
9
  "restartPolicyType": "ON_FAILURE",
10
  "restartPolicyMaxRetries": 10
11
  }