Skip to content

Instantly share code, notes, and snippets.

@adowning
Created November 6, 2019 02:55
Show Gist options
  • Select an option

  • Save adowning/fa7da7e52e7c352bbaf983769d00a83f to your computer and use it in GitHub Desktop.

Select an option

Save adowning/fa7da7e52e7c352bbaf983769d00a83f to your computer and use it in GitHub Desktop.
docker-compose-app.service
# /etc/systemd/system/docker-compose-app.service
# thanks to oleg belostotsky on stack overflow for this
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
# match the below to wherever you copied your docker-compose.yml
WorkingDirectory=/etc/hasura
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