Skip to content

Instantly share code, notes, and snippets.

@g1ibby
Created October 3, 2018 11:55
Show Gist options
  • Save g1ibby/70fd3173f46a43046db294f6b5b1b6e9 to your computer and use it in GitHub Desktop.
Save g1ibby/70fd3173f46a43046db294f6b5b1b6e9 to your computer and use it in GitHub Desktop.
# /etc/systemd/system/docker-compose-registry.service
[Unit]
Description=Docker Compose Registry Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/ubuntu/registry
ExecStart=/usr/local/bin/docker-compose -f docker-compose.registry.yml up -d
ExecStop=/usr/local/bin/docker-compose -f docker-compose.registry.yml down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment