mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 05:56:29 +00:00
refactor: see details below
- Fix emailing. - Updated manage.sh to enhance command handling and service management for backend and frontend. - Introduced utility functions for better code organization and readability. - Added support for checking Node.js version and ensuring the virtual environment is set up. - Implemented improved logging with color-coded output for better visibility. - Created a new nginx.conf.example file for easy Nginx configuration setup for the application.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# ==============================================================================
|
||||
# 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 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=always
|
||||
RestartSec=10
|
||||
|
||||
# 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
|
||||
Reference in New Issue
Block a user