Created
February 22, 2017 23:02
-
-
Save xer0x/cfa2a4001a3293a901ac8cd11ace1c11 to your computer and use it in GitHub Desktop.
Setup Cachet on Docker
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
#!/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