6
4

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 5 years have passed since last update.

gunicornについて

Posted at

備忘録

GCPのCloud runを使用していて、「gunicorn」についてよく分からなかったので、その備忘録。

「gunicorn」とは、UNIXのためのPython WSGI HTTP Serverである。「WSGI」とは、Pythonにおいて、WebサーバとWebアプリケーション(もしくはWebアプリケーションフレームワーク)を接続するための、標準化されたインタフェース定義であるとのこと。昔は様々な状態で実装されていたけど、それを標準化したものということ?

以下はGCPの最後サーバ起動時のコマンドです。

# exec:指定されたコマンドを実行
# --bind IP:PORTの順番。接続するオリジン。右未記入だとIPはデフォルト設定になる?
# --workers :プロセス数
# --threads:スレッド数
# app:app→左はソースコード指定、右は名前。
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app
6
4
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
6
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?