Skip to content

Instantly share code, notes, and snippets.

@k5njm
Created August 23, 2025 12:07
Show Gist options
  • Save k5njm/590e7fdab18cf01fb3455a0d563a4f40 to your computer and use it in GitHub Desktop.
Save k5njm/590e7fdab18cf01fb3455a0d563a4f40 to your computer and use it in GitHub Desktop.
Systemd for balloon docker conpose
sudo tee /etc/systemd/system/ground-station.service >/dev/null <<'EOF'
[Unit]
Description=Balloonatics Ground Station (docker compose)
Requires=docker.service network-online.target
After=docker.service network-online.target
[Service]
Type=oneshot
WorkingDirectory=/home/nick/repos/balloonatics/ground_station
# Optional: give wifi a moment to come up
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/docker compose up -d
ExecStop=/usr/bin/docker compose down
RemainAfterExit=yes
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable ground-station.service
sudo systemctl start ground-station.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment