forked from wangziqi/gongxue-base
chore: add cloud deployment templates
This commit is contained in:
28
scripts/deploy/systemd/tiku-api.service
Normal file
28
scripts/deploy/systemd/tiku-api.service
Normal file
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=tiku-supabase API
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=deploy
|
||||
Group=deploy
|
||||
WorkingDirectory=/opt/tiku-saas/repo
|
||||
EnvironmentFile=/etc/tiku-saas/api.env
|
||||
ExecStart=/usr/bin/node /opt/tiku-saas/repo/apps/api/dist/apps/api/src/server.js
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
KillSignal=SIGTERM
|
||||
TimeoutStopSec=30
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/srv/tiku-saas /opt/tiku-saas/repo
|
||||
CapabilityBoundingSet=
|
||||
AmbientCapabilities=
|
||||
LockPersonality=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
28
scripts/deploy/systemd/tiku-worker.service
Normal file
28
scripts/deploy/systemd/tiku-worker.service
Normal file
@@ -0,0 +1,28 @@
|
||||
[Unit]
|
||||
Description=tiku-supabase worker
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=deploy
|
||||
Group=deploy
|
||||
WorkingDirectory=/opt/tiku-saas/repo
|
||||
EnvironmentFile=/etc/tiku-saas/worker.env
|
||||
ExecStart=/usr/bin/node /opt/tiku-saas/repo/apps/worker/dist/apps/worker/src/index.js --loop
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
KillSignal=SIGTERM
|
||||
TimeoutStopSec=60
|
||||
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/srv/tiku-saas /opt/tiku-saas/repo
|
||||
CapabilityBoundingSet=
|
||||
AmbientCapabilities=
|
||||
LockPersonality=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user