1

I'm trying to deploy the following python app on an heroku server: https://github.com/PX4/flight_review

The main server script is called ./serve.py, you will find it under: https://github.com/PX4/flight_review/blob/master/serve.py

It's a tornado web server, but I m not sure on how to configure it, on my local machine I respond to the url http://localhost:5006/

In added a Procfile as follow:

web: ./serve.py --host 0.0.0.0:5006

and also tried with and without other arguments for the port, and also added a PORT variable into the env variable, but I constantly get the following error:

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

Any idea on what could go wrong?

Thanks in advance!

1 Answer 1

1

Following the documentation about Procfiles:

You have to just use the $PORT environment variable, which is set by Heroku when trying to start your dyno.

In your case that would seem to be:

web: ./serve.py --host 0.0.0.0:$PORT
Sign up to request clarification or add additional context in comments.

2 Comments

You are right, it now works with web: ./serve.py --port $PORT, but the next error I get is related to the database when trying to post a file app[web.1]: Error when handling POST data <class 'FileNotFoundError'> [Errno 2] No such file or directory: Can I post the error here or do I need to ask a new question? thanks!
that's a separate question IMHO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.