#my backend server not responding according to my application code
53 messages · Page 1 of 1 (latest)
Project ID: 0583447a-3b94-4339-9c62-8724bebb6f98
0583447a-3b94-4339-9c62-8724bebb6f98
my backend server not responding according to my application code
My routes are not working
when I'm trying to access them
my app is build using dockerfile
my dockerfile
FROM python:3.9-slim
WORKDIR /app
COPY requirements.txt ./
RUN pip install -r requirements.txt
RUN set -x && apt-get update && apt-get dist-upgrade -y && apt-get install -y --no-install-recommends ffmpeg
COPY . .
CMD ["gunicorn", "--bind", "0.0.0.0:$PORT", "--timeout", "0", "--workers", "4", "app:app"]
Error: '$PORT' is not a valid port number.
I have added the variable myself in the railway
gunicorn listens to 0.0.0.0 and PORT by default, you can remove that as it is redundant
you can also remove PORT from your service variables as railway generates a PORT for you behind the scenes on every deployment
ok let me try that
let's say it didn't listen on PORT by default and you did need to specify that environment variable in the CMD, you would need to change the syntax and remove the array and write the CMD like this
CMD gunicorn --bind 0.0.0.0:$PORT
reason being is the $PORT is not getting escaped when using the array syntax
ok
this did not work
trying this
ohk
WORKDIR /app
COPY requirements.txt ./
RUN pip install -r requirements.txt
RUN set -x && apt-get update && apt-get dist-upgrade -y && apt-get install -y --no-install-recommends ffmpeg
COPY . .
CMD ["gunicorn", "--bind", "0.0.0.0", "--timeout", "0", "--workers", "4", "app:app"]```
like I said, gunicorn listens on 0.0.0.0 by default, specifying that is redundant
but being redundant doesn't mean it should stop working, so let's see your deployment logs please
build logs please https://bookmarklets.up.railway.app/log-downloader/
it does work, please follow the instructions
looks good, deployment logs now please
send your requirements.txt please
btw I don't think there is any problem in all of these but I'll send u wait
Flask==2.3.3
librosa==0.10.1
numpy==1.24.0
pydub==0.25.1
streamlink==6.1.0
tensorflow==2.13.0
gunicorn==21.2.0
Flask-CORS==4.0.0
supabase
aren't you missing tensorrt?
what is that for?
sorry Idk whats that
ohk but how using that will help in this case?
your logs complain about not finding tensor rt, that package supposedly tensor rt
have you read the deployment logs yourself?
thats just a warning that has never affect deploying before
okay I'm just trying to help
I'm trying to access my url
https://myapp.up.railway.app/analyze_video
and it does not responds according to the code but it gives an HTML
I think I'm missing something here
my first time using railway
please send your actual Railway domain
wait
this worked
specifying 0.0.0.0 was casuing the issue
cool!
Thanks 🙏