Skip to content

Instantly share code, notes, and snippets.

@pdxjohnny
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdxjohnny/36d9c30711ca4bd6216d to your computer and use it in GitHub Desktop.
Save pdxjohnny/36d9c30711ca4bd6216d to your computer and use it in GitHub Desktop.
Docker couchdb scripts
couchdb:
image: klaemo/couchdb:latest
ports:
- "15984:5984"
volumes:
- /srv/docker/couchdb:/usr/local/var/lib/couchdb
#! /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
#!/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