python:gunicorn

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
python:gunicorn [2020/04/25 15:47] – [インストール] ともやんpython:gunicorn [2020/09/11 17:25] (現在) ともやん
行 1: 行 1:
-<html> 
-  <style> 
-    #result pre { 
-      overflow: scroll; 
-      overflow-x: hidden; 
-      font-size: 10px; 
-    } 
-    #result_long pre { 
-      height: 400px; 
-      overflow: scroll; 
-      overflow-x: hidden; 
-      font-size: 10px; 
-    } 
-    #logo { 
-      background-color: white; 
-      padding: 15px; 
-    } 
-    #logo p { 
-      margin: 0; 
-    } 
-    .dokuwiki .plugin_wrap { 
-      width: fit-content; 
-    } 
-  </style> 
-</html> 
 ====== Gunicorn - Python WSGI HTTP Server for UNIX ====== ====== Gunicorn - Python WSGI HTTP Server for UNIX ======
 <WRAP #logo> <WRAP #logo>
行 133: 行 108:
 </WRAP> </WRAP>
  
-Django のインストール\\+**Django** のインストール\\
 <code> <code>
 (py3dj3_venv) $ pip install django (py3dj3_venv) $ pip install django
行 149: 行 124:
 Installing collected packages: sqlparse, pytz, asgiref, django Installing collected packages: sqlparse, pytz, asgiref, django
 Successfully installed asgiref-3.2.7 django-3.0.5 pytz-2019.3 sqlparse-0.3.1 Successfully installed asgiref-3.2.7 django-3.0.5 pytz-2019.3 sqlparse-0.3.1
 +</code>
 +</WRAP>
 +
 +**Gunicorn** のインストール\\
 +<code>
 +(py3dj3_venv) $ pip install gunicorn
 +</code>
 +<WRAP prewrap 100% #result>
 +<code>
 +Collecting gunicorn
 +  Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
 +     |████████████████████████████████| 77 kB 412 kB/s
 +Requirement already satisfied: setuptools>=3.0 in ./py3dj3_venv/lib/python3.7/site-packages (from gunicorn) (41.6.0)
 +Installing collected packages: gunicorn
 +Successfully installed gunicorn-20.0.4
 </code> </code>
 </WRAP> </WRAP>
行 170: 行 160:
 <WRAP prewrap 100%> <WRAP prewrap 100%>
 <code> <code>
-$ gunicorn --bind :8000 --chdir /home/tomoyan/django_project django_project.wsgi+py3dj3_venv/bin/gunicorn --bind :8000 --chdir /home/tomoyan/django_project django_project.wsgi 
 +</code>
 </WRAP> </WRAP>
 <WRAP prewrap 100% #result> <WRAP prewrap 100% #result>
行 177: 行 168:
 [2020-04-25 09:25:36 +0900] [289] [INFO] Listening at: http://0.0.0.0:8000 (289) [2020-04-25 09:25:36 +0900] [289] [INFO] Listening at: http://0.0.0.0:8000 (289)
 [2020-04-25 09:25:36 +0900] [289] [INFO] Using worker: sync [2020-04-25 09:25:36 +0900] [289] [INFO] Using worker: sync
-[2020-04-25 09:25:36 +0900] [292] [INFO] Booting worker with pid: 292</code>+[2020-04-25 09:25:36 +0900] [292] [INFO] Booting worker with pid: 292
 </code> </code>
 </WRAP> </WRAP>
 +※Python 仮想環境の Gunicorn を実行すると、仮想環境のパッケージを利用できる。\\
  
 [[http://localhost:8000|]] にブラウザでアクセスする。\\ [[http://localhost:8000|]] にブラウザでアクセスする。\\
 {{:python:uwsgi_django_operation_check_001.png?600|Gunicorn Django Operation Check}}\\ {{:python:uwsgi_django_operation_check_001.png?600|Gunicorn Django Operation Check}}\\
  
-uwsgi コマンドを **Ctrl + C** で終了\\+gunicorn コマンドを **Ctrl + C** で終了\\
 <WRAP prewrap 100% #result> <WRAP prewrap 100% #result>
 <code> <code>
行 199: 行 191:
 </code> </code>
 </WRAP> </WRAP>
 +
 +===== 参考文献 =====
 +[[https://gunicorn.org/#docs|Gunicorn - Python WSGI HTTP Server for UNIX - Documentation]]\\
 +<ifauth @dokuwikiusers>
 +[[system_manage:monsters_garage_servers:skv009_tuning|9号機チューニング]] (内部)\\
 +</ifauth>
  
  • python/gunicorn.1587797237.txt.gz
  • 最終更新: 2020/04/25 15:47
  • by ともやん