Last active
November 20, 2018 11:19
-
-
Save skomma/b5a368367e3dc0e4d8d8 to your computer and use it in GitHub Desktop.
docker-compose upstart template init file
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 template of an upstart init script for using docker-compose | |
# | |
# Usage: | |
# 1. place docker-compose yaml file (ex. rhodecode/docker-compose.yaml) | |
# 2. run the following lines. | |
# # ln -s docker-compose docker-compose_rhodecode.conf | |
# # initctl reload-configuration | |
# # start docker-compose_rhodecode | |
# | |
# Edit CONF_BASE_DIR if you want to change the location of docker-compose configuration file. | |
# | |
# Note: | |
# When using docker-compose 1.5.0, this script is not working properly. | |
# (The docker-compose up command doesn't wait until the containers exit.) | |
# Please use docker-compose 1.4.2. | |
description "Start/Stop container with docker-compose" | |
author "Syunsuke Komma" | |
start on filesystem and started docker | |
stop on runlevel [!2345] | |
kill signal SIGINT | |
env CONF_BASE_DIR=/etc/docker-compose | |
script | |
cd ${CONF_BASE_DIR}/${UPSTART_JOB##*_} | |
docker-compose up --no-recreate --no-color | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
initctl restart
will not work here