mirror of
https://github.com/patrickbeane/quote-of-the-day.git
synced 2026-01-27 18:30:25 +00:00
Secure, rate‑limited Flask + Gunicorn microservice with SQLite persistence, delivery tracking, and systemd deployment config. Includes setup script, HTML template, and production‑ready README.
18 lines
555 B
Desktop File
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
|