Thanks for sharing the guide. However, I noticed to short commings.
- The right volumen mapping is /home/pi/spoolman/data:/home/app/.local/share/spoolman
- You missed defining the service for autostart. E.g,, for systemd it is:
[Unit]
Description=Spool Management
Documentation=https://github.com/Donkie/Spoolman
After=network-online.target
Before=moonraker.service
Wants=udev.target
[Install]
Alias=spoolman
WantedBy=multi-user.target
[Service]
Type=oneshot
User=pi
RemainAfterExit=yes
WorkingDirectory=/home/pi/spoolman
ExecStart=/usr/bin/env /usr/bin/docker-compose -f /home/pi/spoolman/docker-compose.yml up -d
ExecStop=/usr/bin/env /usr/bin/docker-compose -f /home/pi/spoolman/docker-compose.yml stop
You then enable and start the service:
sudo systemctl enable spoolman
sudo systemctl start spoolman
In addition, Before being able to execute docker-compose you have to add your user to the docker group by executing
sudo usermod -aG docker pi