Ready to test in Fab
This commit is contained in:
40
.kanbn/tasks/create-as-service.md
Normal file
40
.kanbn/tasks/create-as-service.md
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
---
|
||||
|
||||
# Create as Service
|
||||
|
||||
```bash
|
||||
sudo -i
|
||||
echo >/etc/systemd/system/barcode-host.service && nano /etc/systemd/system/barcode-host.service
|
||||
```
|
||||
```conf
|
||||
[Unit]
|
||||
Description=Barcode Server
|
||||
After=multi-user.target
|
||||
[Service]
|
||||
User=unity4
|
||||
WorkingDirectory=/var/www/Barcode-Host/Server
|
||||
ExecStart=/usr/local/bin/dotnet /var/www/Barcode-Host/Server/Barcode.Host.Server.dll
|
||||
Restart=always
|
||||
# Environment=ASPNETCORE_ENVIRONMENT=Development
|
||||
# Environment=ASPNETCORE_ENVIRONMENT=Staging
|
||||
Environment=ASPNETCORE_ENVIRONMENT=Production
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
```bash
|
||||
systemctl daemon-reload
|
||||
systemctl enable barcode-host.service
|
||||
systemctl start barcode-host.service
|
||||
systemctl status barcode-host.service
|
||||
systemctl stop barcode-host.service
|
||||
journalctl -fu barcode-host.service
|
||||
journalctl --rotate
|
||||
journalctl --vacuum-time=1s
|
||||
```
|
||||
|
||||
## Sub-tasks
|
||||
|
||||
- [ ] phares3757
|
||||
- [x] unity4
|
||||
- [x] unity5
|
Reference in New Issue
Block a user