29 lines
691 B
Desktop File
29 lines
691 B
Desktop File
[Unit]
|
|
Description=Write Server - Hugo Blog Admin
|
|
Documentation=https://github.com/your-repo/write-server
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=www-data
|
|
Group=www-data
|
|
WorkingDirectory=/opt/write-server
|
|
Environment=NODE_ENV=production
|
|
Environment=PORT=8016
|
|
EnvironmentFile=/opt/write-server/.env
|
|
ExecStart=/usr/bin/node /opt/write-server/.next/standalone/server.js
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
Restart=always
|
|
RestartSec=10
|
|
StandardOutput=append:/opt/write-server/logs/app.log
|
|
StandardError=append:/opt/write-server/logs/app.log
|
|
|
|
# 安全限制
|
|
NoNewPrivileges=true
|
|
ProtectSystem=strict
|
|
ProtectHome=true
|
|
ReadWritePaths=/opt/write-server
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|