DeveloperBreeze

Linux Programming Tutorials, Guides & Best Practices

Explore 50+ expertly crafted linux tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

Deploying a Flask Application on a VPS Using Gunicorn and Nginx

Tutorial August 03, 2024
python bash

Paste the following content:

[Unit]
Description=Gunicorn instance to serve Flask application
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/path/to/your-flask-app
Environment="PATH=/path/to/your-flask-app/venv/bin"
ExecStart=/path/to/your-flask-app/venv/bin/gunicorn --workers 3 --bind unix:/path/to/your-flask-app/developerbreeze.sock app:app

[Install]
WantedBy=multi-user.target