Computer Science/BackEnd

장고에서 Gunicorn 사용하기 | 장고 공식 문서 번역

토마토. 2022. 11. 25. 18:59

How to use Django with Gunicorn | Django documentation | Django (djangoproject.com)

 

Django

The web framework for perfectionists with deadlines.

docs.djangoproject.com

 

How to use Django
with Gunicorn
  • Gunicorn(Green Unicorn)은 UNIX를 위한 파이썬 WSGI 서버이다. 
  • Gunicorn은 python -m pip install gunicorn으로 바로 설치할 수 있다. 
Django를 generic WSGI 애플리케이션으로써
Gunicorn에서 실행하는 법
  • pip로 Gunicorn을 설치하고 나면, Gunicorn 서버 프로세스를 시작하는 gunicorn 명령어를 사용할 수 있다. 
  • 가장 간단한 방법은 gunicorn에 WSGI application 객체가 있는 모듈의 위치를 전달하는 것이다. 
  • 예를 들면 다음과 같다. 
gunicorn myproject.wsgi