Last active
November 6, 2017 01:59
-
-
Save skomma/c4514e84b6a1dcd22d31516f7acc9c2e to your computer and use it in GitHub Desktop.
template unit file for using docker-compose
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
# This file is the systemd template unit for using docker-compose | |
# | |
# Usage: | |
# 1. place docker-compose yaml file (ex. /etc/docker-compose/jenkins/docker-compose.yml) | |
# 2. copy this file to /etc/systemd/system/[email protected] | |
# # curl https://gist.githubusercontent.com/skomma/c4514e84b6a1dcd22d31516f7acc9c2e/raw/8eacc7b62e8a7f170153cfa41338d67b822f95b4/[email protected] -o /etc/systemd/system/[email protected] | |
# 3. run "systemctl start [email protected]" | |
# (If you want to start automatically at boot time, run systemctl enable [email protected]) | |
[Unit] | |
Description=Docker-compose managed containers | |
After=docker.service | |
[Service] | |
WorkingDirectory=/etc/docker-compose/%i | |
ExecStart=/usr/local/bin/docker-compose up | |
ExecStop=/usr/local/bin/docker-compose down | |
KillSignal=SIGINT | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
対応ありがとう!