CommandError: "0.0.0.0:$PORT" is not a valid port number or address:port pair.
milan-mmTRIAL
7 months ago
i tried
Expor a porta correta (Railway geralmente define o valor da variável de ambiente PORT)
EXPOSE 8080
Criar um script de inicialização para garantir que a variável PORT seja interpretada corretamente
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
Definir o script de inicialização como ponto de entrada
CMD ["/app/start.sh"]
and
Expor a porta 8080 (Railway geralmente usa esta porta ou uma atribuída dinamicamente)
EXPOSE 8080
Executar Gunicorn, vinculando-o à variável de ambiente PORT
CMD ["gunicorn", "--bind", "0.0.0.0:$PORT", "frequencia_monitoria.wsgi:application"]
nothing is working!
ⓘ Deployment information is only viewable by project members and Railway employees.
1 Replies
7 months ago
Hey, This is an English-only community, please open a new post in English, thank you for understanding!
Status changed to Closed brody • 7 months ago