Files
quote-of-the-day/deploy/quotes.service
patrickbeane ddf5e983e2 Initial commit: Quote of the Day API
Secure, rate‑limited Flask + Gunicorn microservice with SQLite persistence, delivery tracking, and systemd deployment config. Includes setup script, HTML template, and production‑ready README.
2025-08-30 13:24:33 -04:00

18 lines
555 B
Desktop File

# /etc/systemd/system/quotes.service
[Unit]
Description=Flask Quote and API (Gunicorn)
After=network.target
[Service]
User=yourusername
WorkingDirectory=/home/yourusername/quote-of-the-day
ExecStart=/home/yourusername/quote-of-the-day/venv/bin/gunicorn quotes:app --workers 2 --bind 0.0.0.0:5051
Restart=always
RestartSec=5
Environment="PATH=/home/yourusername/quote-of-the-day/venv/bin:/usr/bin"
Environment="VIRTUAL_ENV=/home/yourusername/quote-of-the-day/venv"
Environment="FLASK_ENV=production"
[Install]
WantedBy=multi-user.target