mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 14:06:28 +00:00
f8dcf6e3d3
BREAKING CHANGE: apps/backend/requirements.txt is no longer the backend dependency source. Use uv sync and uv run python main.py for backend setup and startup.
67 lines
1.9 KiB
Plaintext
67 lines
1.9 KiB
Plaintext
# ==============================================================================
|
|
# CheckIn App V2 - Systemd Service File Example
|
|
# ==============================================================================
|
|
#
|
|
# This file defines a systemd service for running the CheckIn App backend
|
|
#
|
|
# Installation:
|
|
# 1. Copy this file: sudo cp deploy/systemd/checkin-app.service.example /etc/systemd/system/checkin-app.service
|
|
# 2. Edit the file and replace placeholders with your actual values
|
|
# 3. Reload systemd: sudo systemctl daemon-reload
|
|
# 4. Enable service: sudo systemctl enable checkin-app.service
|
|
# 5. Start service: sudo systemctl start checkin-app.service
|
|
# 6. Check status: sudo systemctl status checkin-app.service
|
|
#
|
|
# Management Commands:
|
|
# Start: sudo systemctl start checkin-app
|
|
# Stop: sudo systemctl stop checkin-app
|
|
# Restart: sudo systemctl restart checkin-app
|
|
# Status: sudo systemctl status checkin-app
|
|
# Logs: sudo journalctl -u checkin-app -f
|
|
#
|
|
# ==============================================================================
|
|
|
|
[Unit]
|
|
Description=CheckIn App V2 - Backend API Service
|
|
Documentation=https://github.com/Cccc-owo/CheckInApp
|
|
After=network.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
# CHANGE THIS: Replace with your actual username
|
|
User=username
|
|
|
|
# CHANGE THIS: Replace with your actual installation path
|
|
# Example: /home/username/CheckInApp
|
|
WorkingDirectory=/path/to/CheckInApp
|
|
|
|
# Start backend using the uv-managed Python project manager
|
|
ExecStart=/usr/bin/env uv run python /path/to/CheckInApp/main.py backend --no-reload
|
|
|
|
# Restart policy
|
|
Restart=on-failure
|
|
RestartSec=10s
|
|
|
|
# Kill settings
|
|
KillSignal=SIGTERM
|
|
KillMode=mixed
|
|
|
|
# Timeout settings
|
|
TimeoutStartSec=60
|
|
TimeoutStopSec=30
|
|
|
|
# Resource limits
|
|
LimitNOFILE=65535
|
|
|
|
# Security settings
|
|
NoNewPrivileges=true
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=checkin-app
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|