4 months ago
Hi team,
Recently, I were in trouble when installing playwright. So I switched from railway.json to railpack.json to create a Docker file for deploying, and it worked.
But yesterday, I redeployed without changing anything, and I got a crash notification. I saw a successful build in the build log, but saw this error in the deploy log: /bin/bash: line 1: /app/.venv/bin/hypercorn: cannot execute: required file not found.
Here is the railpack.json file
{
"$schema": "https://schema.railpack.com",
"provider": "python",
"steps": {
"playwright": {
"inputs": [
{
"step": "build"
}
],
"commands": [
"python -m playwright install --with-deps chromium"
]
}
},
"deploy": {
"inputs": [
{
"step": "playwright"
}
],
"startCommand": "hypercorn main:app --bind \"[::]:$PORT\""
}
}
Any help would be great, thanks!
Here is the project_id: 86b6d50c-4a4d-423a-81d5-4e7a0d38cacd
1 Replies
4 months ago
I had exact problem like you. I tried this and it resolved the problem:
1) Update railpack.json to:
{
"$schema": "https://schema.railpack.com",
"provider": "python",
"steps": {
"playwright": {
"inputs": [{ "step": "build" }],
"commands": ["python -m playwright install --with-deps chromium"]
}
}
}
2) Create "Procfile" in same directory as railpack.json, and add this one line to the file:
web: hypercorn main:app --bind "[::]:$PORT"
It works now, except that I need to change from "web: hypercorn --bind 0.0.0.0:$PORT main:app" to "web: hypercorn --bind [::]:$PORT main:app"
4 months ago
!s
Status changed to Solved brody • 4 months ago