Initial commit: FunConnect project with server, relay, client and admin panel
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
36
deploy/funmc-server.service
Normal file
36
deploy/funmc-server.service
Normal file
@@ -0,0 +1,36 @@
|
||||
[Unit]
|
||||
Description=FunMC Main Server - Minecraft Multiplayer Assistant API
|
||||
Documentation=https://github.com/mofangfang/funmc
|
||||
After=network.target postgresql.service
|
||||
Requires=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=funmc
|
||||
Group=funmc
|
||||
WorkingDirectory=/opt/funmc
|
||||
ExecStart=/opt/funmc/server
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=funmc-server
|
||||
|
||||
# 环境变量
|
||||
Environment=RUST_LOG=funmc_server=info,tower_http=info
|
||||
Environment=LISTEN_ADDR=0.0.0.0:3000
|
||||
EnvironmentFile=/opt/funmc/.env
|
||||
|
||||
# 安全限制
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ReadWritePaths=/var/log/funmc
|
||||
PrivateTmp=yes
|
||||
|
||||
# 资源限制
|
||||
LimitNOFILE=65536
|
||||
LimitNPROC=4096
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user