#Flask Gunicorn
5 messages · Page 1 of 1 (latest)
1f7c87ef-6c55-4374-8c61-50c6ad752ad2
Went to edit my message and Discord deleted it 😦
Anyways, trying to figure out why a simple Gunicorn + Flask docker container is failing on Railway. It works just fine locally, in compose, on Render, or on Heroku.
Here is my Dockerfile:
FROM --platform=linux/amd64 python:3.11.2-bullseye
ENV ENV="production"
ENV FLASK_APP=wsgi.py
ARG GUNICORN=true
WORKDIR /app
# install .NET
RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update && \
apt-get install -y aspnetcore-runtime-6.0
RUN apt-get install -y dotnet-runtime-6.0
COPY ./requirements.txt .
# install our required packages with python3 & pip, as a user (avoids perm issues)
RUN python3 -m pip install -r requirements.txt
# copy the app in
COPY . .
# expose port 5000
EXPOSE 5000
ENTRYPOINT ["gunicorn"]
CMD [ "-b", "0.0.0.0:5000", "--workers", "4", "--timeout", "120", "wsgi:app", "--reload" ]
This is the output on Render:
looks like you are running out of memory, you only get 512mb on the trial plan