Runnning on Raspberry pi can be done like so:
- create a folder at
/home/<user>/coat-rack
- create a file at
/home/<user>/coat-rack/start.sh with the following:
echo "Starting Coat Rack Server using start.sh"
/home/<user>/.local/share/pnpm/pnpm dlx @coat-rack/server
The above depends on how pnpm is installed but needs to be an absolute path to the pnpm binary
- create a file at
/lib/systemd/system/coatrack.service with the following
[Unit]
Description=Start the coat rack server
After=network-online.target
[Service]
ExecStart=/bin/bash /home/<user>/coat-rack/start.sh
WorkingDirectory=/home/<user>/coat-rack/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=<user>
[Install]
WantedBy=multi-user.target
Of course, replace the <user> with your user
Once all of this is done, you can manage everything with the following (systemd) commands:
# start/check service status
systemctl start coatrack.service
systemctl status coatrack.service
# enable service autostart
sudo systemctl enable coatrack.service
# view logs
journalctl -u coatrack.service
This is a really basic setup, would be nice if we could auto-configure this, but I think we can leave that to the raspberry pi image stuff
Runnning on Raspberry pi can be done like so:
/home/<user>/coat-rack/home/<user>/coat-rack/start.shwith the following:/lib/systemd/system/coatrack.servicewith the followingOnce all of this is done, you can manage everything with the following (systemd) commands:
This is a really basic setup, would be nice if we could auto-configure this, but I think we can leave that to the raspberry pi image stuff