Skip to content

Instantly share code, notes, and snippets.

@tonidy
Last active February 18, 2025 14:15
Show Gist options
  • Save tonidy/04760a3c729d04e1fe20edd09729b31e to your computer and use it in GitHub Desktop.
Save tonidy/04760a3c729d04e1fe20edd09729b31e to your computer and use it in GitHub Desktop.
Playit Docker Compose Service
services:
playit:
image: ghcr.io/playit-cloud/playit-agent:0.15
network_mode: host
restart: always
environment:
- SECRET_KEY=abcde
sudo systemctl start playit
sudo systemctl status playit
sudo systemctl enable playit
[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