dev / templates / bot / deploy / ardegazu-__NAME__@.service
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# systemd template unit for the __NAME__ fleet — one instance per bot.
#   install: cp deploy/ardegazu-__NAME__@.service /etc/systemd/system/
#            mkdir -p /etc/ardegazu-__NAME__   (one <name>.json per instance)
#            systemctl enable --now ardegazu-__NAME__@__NAME__
# A static user (not DynamicUser) so every instance and the trainer share the
# models/ checkpoint directory: useradd -r -s /usr/sbin/nologin ardegazu-__NAME__
[Unit]
Description=ardegazu suite bot __NAME__ (%i)
After=network-online.target
Wants=network-online.target

[Service]
User=ardegazu-__NAME__
Group=ardegazu-__NAME__
ExecStart=/usr/bin/node /opt/ardegazu-__NAME__/dist/main.js /etc/ardegazu-__NAME__/%i.json
StateDirectory=ardegazu-__NAME__/%i ardegazu-__NAME__/models
Environment=NODE_ENV=production
Restart=always
RestartSec=5
MemoryHigh=450M
MemoryMax=600M
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes

[Install]
WantedBy=multi-user.target

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/dev.git