mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 05:56:29 +00:00
73 lines
2.0 KiB
Plaintext
73 lines
2.0 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 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=forking
|
|
# 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
|
|
|
|
# PID file written by manage.sh
|
|
PIDFile=/path/to/CheckInApp/backend.pid
|
|
|
|
# Start backend using manage.sh script
|
|
ExecStart=/path/to/CheckInApp/manage.sh start backend
|
|
|
|
# Stop backend using manage.sh script
|
|
ExecStop=/path/to/CheckInApp/manage.sh stop backend
|
|
|
|
# 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
|