CommandError: "0.0.0.0:$PORT" is not a valid port number or address:port pair.
milan-mm
HOBBYOP

2 years ago

i tried

EXPOSE 8080

#variable port

RUN echo '#!/bin/sh\nexec gunicorn --bind 0.0.0.0:${PORT:-8080} frequencia_monitoria.wsgi:application' > /app/start.sh

RUN chmod +x /app/start.sh

CMD ["/app/start.sh"]

and tried

#use port 8080

EXPOSE 8080

#execute gunicorn

CMD ["gunicorn", "--bind", "0.0.0.0:$PORT", "frequencia_monitoria.wsgi:application"]

nothing is working!

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

1 Replies

2 years ago

Use this CMD instead -

CMD exec gunicorn --bind 0.0.0.0:$PORT frequencia_monitoria.wsgi:application

Welcome!

Sign in to your Railway account to join the conversation.

Loading...