Created
August 23, 2025 12:07
-
-
Save k5njm/590e7fdab18cf01fb3455a0d563a4f40 to your computer and use it in GitHub Desktop.
Systemd for balloon docker conpose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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