Skip to content

Commit

Permalink
add systemd configs for explorer (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian authored Jan 20, 2025
1 parent e072c25 commit 213378e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions explorer/astral/logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/var/log/astral-indexers.log {
daily
rotate 7
compress
missingok
notifempty
create 0644 ubuntu ubuntu
su ubuntu ubuntu
postrotate
systemctl restart astral-indexers.service > /dev/null 2>/dev/null || true
endscript
}
23 changes: 23 additions & 0 deletions explorer/astral/systemd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[Unit]
Description=Astral Indexers Service
After=network.target

[Service]
User=ubuntu
Environment=NODE_VERSION=22.11.0
Environment=NVM_DIR=/home/ubuntu/.nvm
Environment=PATH=/home/ubuntu/.nvm/versions/node/v22.11.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WorkingDirectory=/home/ubuntu/astral/indexers
ExecStart=/home/ubuntu/.nvm/versions/node/v22.11.0/bin/node /home/ubuntu/.nvm/versions/node/v22.11.0/bin/yarn prod
Restart=always
RestartSec=5
SyslogIdentifier=astral-indexers
StandardOutput=append:/var/log/astral-indexers.log
StandardError=append:/var/log/astral-indexers.log

# Resource limits
CPUQuota=80%
MemoryMax=52G

[Install]
WantedBy=multi-user.target

0 comments on commit 213378e

Please sign in to comment.