1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Python × FastAPI × Heroku】Procfile はこう書け!

Posted at

目的

fastAPI と Heroku を使用した場合の Procfile についての注意点を示すこと

OK

web: uvicorn timelabAPI:app --host=0.0.0.0 --port=${PORT:-5000}

IPアドレスを 0.0.0.0 にしておく!
Heroku 上で動かすときに、外部から呼び出し可能になる。

NG

web: uvicorn timelabAPI:app

IPアドレスが 127.0.0.1 となる。
これでは、Herokuのローカル 上でしか動かない。
外部から呼び出せない。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?