yaar.service 558 B

1234567891011121314151617181920212223242526
  1. [Unit]
  2. Description=YAAR - YouTube Auto-Archiver and Retagger
  3. After=network.target
  4. [Service]
  5. Type=simple
  6. WorkingDirectory=/opt/yaar/web
  7. EnvironmentFile=/etc/yaar.env
  8. ExecStart=/opt/yaar/venv/bin/gunicorn \
  9. --workers 2 \
  10. --bind 0.0.0.0:7474 \
  11. --timeout 0 \
  12. --log-file /opt/yaar/logs/gunicorn.log \
  13. --access-logfile /opt/yaar/logs/access.log \
  14. app:app
  15. Restart=on-failure
  16. RestartSec=5s
  17. # Security hardening
  18. NoNewPrivileges=yes
  19. PrivateTmp=yes
  20. ProtectSystem=full
  21. ReadWritePaths=/opt/yaar /media/yaar
  22. [Install]
  23. WantedBy=multi-user.target