Last active
February 18, 2025 14:15
-
-
Save tonidy/04760a3c729d04e1fe20edd09729b31e to your computer and use it in GitHub Desktop.
Playit Docker Compose Service
This file contains 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
services: | |
playit: | |
image: ghcr.io/playit-cloud/playit-agent:0.15 | |
network_mode: host | |
restart: always | |
environment: | |
- SECRET_KEY=abcde |
This file contains 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 systemctl start playit | |
sudo systemctl status playit | |
sudo systemctl enable playit |
This file contains 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
[Unit] | |
Description=Playit Docker Compose Service | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/bash -c "/usr/bin/docker compose -f /root/playit/docker-compose.yml up --detach" | |
ExecStop=/bin/bash -c "/usr/bin/docker compose -f /root/playit/docker-compose.yml stop" | |
TimeoutStartSec=0 | |
User=root | |
Group=docker | |
[Install] | |
WantedBy=multi-user.target | |
# Location /etc/systemd/system/playit.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment