feat(deploy): 添加开发环境 systemd 服务,改进部署文档
This commit is contained in:
28
rust-backend-dev.service
Normal file
28
rust-backend-dev.service
Normal file
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=Rust Backend Development Service
|
||||
After=network.target postgresql.service
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
WorkingDirectory=/root/rust/rust_backend_dev
|
||||
ExecStart=/root/rust/rust_backend_dev/rust-backend
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
EnvironmentFile=/root/rust/rust_backend_dev/.env
|
||||
|
||||
NoNewPrivileges=yes
|
||||
PrivateTmp=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=read-only
|
||||
ReadWritePaths=/root/rust/rust_backend_dev
|
||||
|
||||
SyslogIdentifier=rust-backend-dev
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user