Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker Compose Pi3 Applications Service
# File: /etc/systemd/system/docker-compose-opt.service
[Unit]
Description=Docker Compose Opt Service
Requires=docker.service network-online.target
After=docker.service network-online.target
[Service]
WorkingDirectory=/opt/applications
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/local/bin/docker-compose pull --quiet
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose stop
ExecReload=/usr/local/bin/docker-compose pull --quiet
ExecReload=/usr/local/bin/docker-compose up -d
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
You can’t perform that action at this time.