rose
rose
RRailway
Created by rose on 1/10/2024 in #✋|help
"Application Failed to Respond" error when using docker to build
My dockerfile works on my local machine but after deploying to Railway, it seems there might be something wrong with the port? I am still really new to production environments and am having trouble configuring my Dockerfile for a Django production environment that utilizes outside packages not compatible with Nixpacks. Here's what I have in my Dockerfile:
FROM python:3.11

# Set working directory
WORKDIR .

# Install dependencies
RUN apt-get update
RUN apt-get install -y texlive-full
RUN rm -rf /var/lib/apt/lists/*

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000

CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
FROM python:3.11

# Set working directory
WORKDIR .

# Install dependencies
RUN apt-get update
RUN apt-get install -y texlive-full
RUN rm -rf /var/lib/apt/lists/*

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000

CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
26 replies
RRailway
Created by rose on 12/11/2023 in #✋|help
How to get a different version of a library with Nixpacks?
Hey! I'm trying to deploy a Django webapp that converts an Excel file to LaTeX code. The conversion works fine locally, but I get the following error when trying to convert during deployment: I think that I need to specify my version of zlib to 1.2.11 to match the Lua package that is installed, but I am unsure of how to do so. I've included my railway.json file for reference. { "$schema": "https://schema.up.railway.app/railway.schema.json", "build": { "builder": "NIXPACKS", "nixpacksPlan": { "phases": { "setup": { "aptPkgs": ["...", "texlive-full", "wget"], "cmds": [ "wget https://zlib.net/fossils/zlib-1.2.11.tar.gz && tar -xzf zlib-1.2.11.tar.gz && cd zlib-1.2.11 && ./configure && make && sudo make install" ] } } } }, "deploy": { "startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn layoutGenerator.wsgi", "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 } } Service ID: bc0601b0-5427-4902-accd-52ebac13d6f2
5 replies
RRailway
Created by rose on 12/8/2023 in #✋|help
Help Installing Packages w/ Nixpacks
Hi all, I'm trying to use Nixpacks to install 'texliveSmall' so that I can deploy a Django web app through a github repo. In my railway.json file, I've used nixPkg to install it but when I try to use the app after deployment, it still cannot find the lualatex package, which I've verfied is in texliveSmall. Am I installing it correctly for my app to be able to use it? Here's a snippet of my railway.json file: "$schema": "https://railway.app/railway.schema.json", "setup": { "nixPkgs": "texliveSmall" }, "build": { "builder": "NIXPACKS" }, "deploy": { "startCommand": "cd layoutGenerator && python manage.py migrate && python manage.py collectstatic --noinput && gunicorn layoutGenerator.wsgi", "restartPolicyType": "ON_FAILURE", "restartPolicyMaxRetries": 10 } I am brand new to Railway (still in undergrad here) and would appreciate any help at all! I have tried nearly everything I can think of and still get the same error that the server cannot find the right file. I also do not know what project ID means but if someone lets me know what that's referring to, I will add it right away!!
79 replies