Last active
August 19, 2019 05:43
-
-
Save pgilad/82629d3c0099b385ef18dfd554af066a to your computer and use it in GitHub Desktop.
Docker Compose Pi3 Applications Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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