Skip to content

Instantly share code, notes, and snippets.

@mikeg0
Created January 27, 2019 03:49
Show Gist options
  • Save mikeg0/96744a167830a63700d3961495dc8dd2 to your computer and use it in GitHub Desktop.
Save mikeg0/96744a167830a63700d3961495dc8dd2 to your computer and use it in GitHub Desktop.
docker-compose-app.service for traffic-cam
# /etc/systemd/system/docker-compose-app.service
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/srv/docker
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose 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