systemctl: /etc/systemd/system/gunicorn.service
[Unit]
Description=Gunicorn + Uvicorn Worker Service
After=network.target
[Service]
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/venv/bin/gunicorn 프로젝트명.asgi:application \
-k uvicorn.workers.UvicornWorker \
-w 4 \
-b unix:/tmp/gunicorn.sock
Restart=always
KillSignal=SIGTERM
Type=simple
[Install]
WantedBy=multi-user.target
시작: sudo systemctl start gunicorn
로그: sudo journalctl -u gunicorn -f
'python' 카테고리의 다른 글
django - settings.py 기본 보안 설정 (0) | 2025.02.25 |
---|---|
uwsgi 자동 시작 설정 [우분투] (0) | 2024.12.26 |
구글 네이버 sso 로그인 django 설정 정보 (2) | 2024.11.20 |
기본 django 세팅 (0) | 2024.08.27 |
uWSGI 관련 (0) | 2024.08.23 |