[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
