Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 983 Bytes

README.md

File metadata and controls

37 lines (24 loc) · 983 Bytes

Python starter

Deploy on velixir

Flask for the routing, gunicorn as the production server, and a Procfile telling the platform how to start it. The shape almost every Python service ends up in, minus the parts you would delete anyway.

Deploy it on velixir.

Running it locally

pip install -r requirements.txt
python main.py

Then open http://localhost:8080.

Deploying

velixir deploy

velixir installs your requirements and builds the image server-side.

The two rules

  • The Procfile matters. Without it the platform starts Flask's development server, which is single-threaded and warns loudly. gunicorn is what should serve real traffic.
  • Bind $PORT on 0.0.0.0. velixir injects PORT; a loopback-only bind builds fine and then fails its health check.

Licence

MIT.