Trouble Deploying From GitHub Repo

rthiddenPRO

6 months ago

I am having trouble deploying my app from a GitHub Repo. When it failed originally after troubleshooting I added railway.json and nixpacks.toml files and I am still having issues. I will include the logs and files below:

Build Log:
Region: us-west1]

==============

Using Nixpacks

==============

context: 784dc930e606a7716da91d42caec3c25

╔══════════════════════════════ Nixpacks v1.29.0 ══════════════════════════════╗

║ setup │ python311Full, gcc ║

║──────────────────────────────────────────────────────────────────────────────║

║ install │ python -m venv /app/venv ║

║ │ source /app/venv/bin/activate ║

║ │ cd backend ║

║ │ pip install -r requirements.txt ║

║──────────────────────────────────────────────────────────────────────────────║

║ build │ cd backend ║

║──────────────────────────────────────────────────────────────────────────────║

║ start │ source /app/venv/bin/activate && cd backend && gunicorn ║

║ │ app.main:app -k uvicorn.workers.UvicornWorker --bind ║

║ │ 0.0.0.0:$PORT ║

╚══════════════════════════════════════════════════════════════════════════════╝

#13 0.075 /bin/bash: line 1: pip: command not found

#13 ERROR: process "/bin/bash -ol pipefail -c pip install -r requirements.txt" did not complete successfully: exit code: 127

Railway.json:

{
  "$schema": "https://backboard.railway.app/railway.schema.json",
  "build": {
    "builder": "NIXPACKS",
    "nixpacksPlan": {
      "providers": ["python"],
      "phases": {
        "setup": {
          "nixPkgs": ["python311Full", "gcc"]
        },
        "install": {
          "cmds": [
            "python -m venv /app/venv",
            "source /app/venv/bin/activate",
            "cd backend",
            "pip install -r requirements.txt"
          ]
        }
      }
    }
  },
  "deploy": {
    "startCommand": "source /app/venv/bin/activate && cd backend && gunicorn app.main:app -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT",
    "healthcheckPath": "/api/health",
    "healthcheckTimeout": 300,
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 5
  }
}

nixpacks.toml:

providers = ["python"]

[phases.setup]

nixPkgs = [

"python311Full",

"gcc"

]

[phases.install]

cmds = [

"python -m venv /app/venv",

"source /app/venv/bin/activate",

"cd backend",

"pip install -r requirements.txt"

]

[phases.build]

cmds = ["cd backend"]

[start]

cmd = "source /app/venv/bin/activate && cd backend && gunicorn app.main:app -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT"

Requirements.txt:

aiofiles==24.1.0
aiohappyeyeballs==2.4.3
aiohttp==3.10.10
aiosignal==1.3.1
annotated-types==0.7.0
anyio==4.6.2.post1
asgiref==3.8.1
attrs==24.2.0
build==1.2.2.post1
certifi==2024.8.30
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
dataclasses-json==0.6.7
distro==1.9.0
ecdsa==0.19.0
faiss-cpu==1.9.0
fastapi==0.115.4
filelock==3.16.1
frozenlist==1.5.0
fsspec==2024.10.0
git-filter-repo==2.45.0
greenlet==3.1.1
gunicorn==23.0.0
h11==0.14.0
httpcore==1.0.6
httpx==0.27.2
httpx-sse==0.4.0
huggingface-hub==0.26.2
idna==3.10
Jinja2==3.1.4
jiter==0.7.0
joblib==1.4.2
jsonpatch==1.33
jsonpointer==3.0.0
langchain==0.3.7
langchain-community==0.3.5
langchain-core==0.3.15
langchain-openai==0.2.5
langchain-text-splitters==0.3.2
langsmith==0.1.139
Markdown==3.7
MarkupSafe==3.0.2
marshmallow==3.23.1
mpmath==1.3.0
multidict==6.1.0
mypy-extensions==1.0.0
networkx==3.4.2
nltk==3.9.1
numpy==1.26.4
openai==1.54.1
orjson==3.10.11
packaging==24.1
pandas==2.2.3
pillow==11.0.0
pip-tools==7.4.1
propcache==0.2.0
psutil==6.1.0
pyasn1==0.6.1
pydantic==2.9.2
pydantic-settings==2.6.1
pydantic_core==2.23.4
pyproject_hooks==1.2.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-jose==3.3.0
python-multipart==0.0.17
pytz==2024.2
PyYAML==6.0.2
regex==2024.9.11
requests==2.32.3
requests-toolbelt==1.0.0
rsa==4.9
safetensors==0.4.5
scikit-learn==1.5.2
scipy==1.14.1
sentence-transformers==3.2.1
six==1.16.0
sniffio==1.3.1
SQLAlchemy==2.0.35
starlette==0.41.2
sympy==1.13.1
tenacity==9.0.0
threadpoolctl==3.5.0
tiktoken==0.8.0
tokenizers==0.20.3
torch==2.5.1
torchvision==0.20.1
tqdm==4.66.6
transformers==4.46.2
typing-inspect==0.9.0
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.2.3
uvicorn==0.32.0
yarl==1.17.1
Closed

2 Replies

rthiddenPRO

6 months ago

Now, I am getting this in the build log:

=== Successfully Built! ===

Run:
docker run -it us-west1.registry.rlwy.net/6de2d411-a6d5-43e9-9a6f-3841c1f8ccd3:53c667ec-1e2d-442e-9beb-1524b68cdf31

Build time: 234.27 seconds

====================

Starting Healthcheck

====================

Path: /healthz

Retry window: 5m0s

Attempt #1 failed with service unavailable. Continuing to retry for 4m49s

Attempt #2 failed with service unavailable. Continuing to retry for 4m38s

Attempt #3 failed with service unavailable. Continuing to retry for 4m26s

Attempt #4 failed with service unavailable. Continuing to retry for 4m12s

Attempt #5 failed with service unavailable. Continuing to retry for 3m54s

Attempt #6 failed with service unavailable. Continuing to retry for 3m28s

Attempt #7 failed with service unavailable. Continuing to retry for 2m48s

Attempt #8 failed with service unavailable. Continuing to retry for 2m8s

Attempt #9 failed with service unavailable. Continuing to retry for 1m28s

Attempt #10 failed with service unavailable. Continuing to retry for 48s

Attempt #11 failed with service unavailable. Continuing to retry for 8s

1/1 replicas never became healthy!

Healthcheck failed!


rthiddenPRO

6 months ago

I have moved on from this. No need to respond.


Status changed to Closed brody 6 months ago


Trouble Deploying From GitHub Repo - Railway Help Station