mirror of
https://github.com/patrickbeane/quote-of-the-day.git
synced 2026-04-06 07:35:32 +00:00
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.
This commit is contained in:
17
deploy/quotes.service
Normal file
17
deploy/quotes.service
Normal file
@@ -0,0 +1,17 @@
|
||||
# /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
|
||||
Reference in New Issue
Block a user