Last active
August 29, 2015 14:22
-
-
Save pdxjohnny/36d9c30711ca4bd6216d to your computer and use it in GitHub Desktop.
Docker couchdb scripts
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
couchdb: | |
image: klaemo/couchdb:latest | |
ports: | |
- "15984:5984" | |
volumes: | |
- /srv/docker/couchdb:/usr/local/var/lib/couchdb | |
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
#! /bin/sh | |
# /etc/init.d/docker-couchdb | |
# | |
case "$1" in | |
start) | |
echo "Starting docker couchdb..." | |
docker start couchdb_couchdb_1 | |
;; | |
stop) | |
echo "Stoping docker couchdb..." | |
docker stop couchdb_couchdb_1 | |
;; | |
*) | |
echo "Usage: sudo service docker-couchdb {start|stop}" | |
exit 1 | |
;; | |
esac | |
exit 0 | |
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
#!/bin/bash | |
# Run as root | |
NAME="docker-couchdb" | |
docker-compose up | |
cp ./${NAME} /etc/init.d/${NAME} | |
chmod 774 /etc/init.d/${NAME} | |
update-rc.d ${NAME} defaults 99 01 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment