Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
added upstart job
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbrouse committed Jun 14, 2015
1 parent e0e0dcb commit e1a8997
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,16 @@ More information on the configurations can be found on the [project's git page](

- The nginx container is pulled from the [official nginx Docker Hub repository](https://registry.hub.docker.com/_/nginx/).
- The Ice container's base image is a [Java 7 container](https://registry.hub.docker.com/u/jonbrouse/java/) which is part of an automated build repository that I maintain.

# Upstart Job

I've included an Upstart job in the `init` directory of this repository. This will allow you to start the containers with `start ice` and stop them by running `stop ice`. This will also start your containers at boot.

1. Copy `init/ice.conf` to your host's `/etc/init/` directory
2. Edit the the job `vi /etc/init/ice.conf` and change the path to the docker-compose file

pre-start exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml up -d

post-stop exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml stop

4. Reload the job controller `initctl reload-configuration`
9 changes: 9 additions & 0 deletions init/ice.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description "Ice and Nginx containers"
author "Jon Brouse @jonbrouse github/jonbrouse"

start on (filesystem and started docker)
stop on runlevel [!2345]

pre-start exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml up -d

post-stop exec /usr/local/bin/docker-compose -f /path/to/your/docker-compose.yml stop

0 comments on commit e1a8997

Please sign in to comment.