DevOps 2025-10-26
Deploy Python Flask/Django App
Setup with Gunicorn + Nginx
pip install gunicorn
gunicorn --workers 4 --bind 0.0.0.0:8000 app:appSystemd Service
[Unit]
Description=My Flask App
After=network.target
[Service]
User=www-data
WorkingDirectory=/var/www/myapp
ExecStart=/usr/local/bin/gunicorn --workers 4 --bind unix:myapp.sock app:app
[Install]
WantedBy=multi-user.target
#Sudofree#Python app