Skip to content

Instantly share code, notes, and snippets.

@xer0x
Created February 22, 2017 23:02
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 xer0x/cfa2a4001a3293a901ac8cd11ace1c11 to your computer and use it in GitHub Desktop.
Save xer0x/cfa2a4001a3293a901ac8cd11ace1c11 to your computer and use it in GitHub Desktop.
Setup Cachet on Docker
#!/usr/bin/env bash
# Following the steps on https://docs.cachethq.io/docs/get-started-with-docker
setup () {
git clone https://github.com/cachethq/Docker.git cachet-docker
cd cachet-docker
LATEST_TAG=$(git tag -l | grep -i '^v' | sort | tail -n 1)
# Checkout latest source tag
git checkout $LATEST_TAG
# build containers
docker-compose build
# start service
docker-compose up -d
# give cachet time to start
sleep 5
# generate key
docker exec -i cachetdocker_cachet_1 php artisan key:generate
# install
docker exec -i cachetdocker_cachet_1 php artisan app:install
}
start () {
cd cachet-docker
docker-compose up -d
}
stop () {
cd cachet-docker
docker-compose down
}
"$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment