v1
This commit is contained in:
commit
654eb49502
30 changed files with 4420 additions and 0 deletions
31
deploy/fileshare.service
Normal file
31
deploy/fileshare.service
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# /etc/systemd/system/fileshare.service
|
||||
# Adjust User, WorkingDirectory and ExecStart paths to your install.
|
||||
#
|
||||
# sudo cp deploy/fileshare.service /etc/systemd/system/
|
||||
# sudo systemctl daemon-reload
|
||||
# sudo systemctl enable --now fileshare
|
||||
# sudo journalctl -u fileshare -f
|
||||
|
||||
[Unit]
|
||||
Description=One-Time File Share
|
||||
After=network.target mysqld.service
|
||||
Wants=mysqld.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=fileshare
|
||||
Group=fileshare
|
||||
WorkingDirectory=/opt/fileshare
|
||||
EnvironmentFile=/opt/fileshare/.env
|
||||
ExecStart=/usr/bin/node src/server.js
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
# Hardening
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
ReadWritePaths=/opt/fileshare/data
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue