added
samplefiles/post-receive.sample
@@ -0,0 +1,20 @@#!/bin/sh## For easy server deploys you can create add this post-receive hook to your# server in a bare repo somewhere like /srv/git/timelite/hooks/post-receive# and make a git clone in /srv/docker/timelite. This script will then run on# pushing updates to the server to build and deploy new docker images.while read oldrev newrev ref; do if [ "$ref" = "refs/heads/master" ]; then unset GIT_DIR # unset GIT_DIR so that git pull works correctly START_TIME=`date +%s` cd /srv/docker/timelite git pull docker-compose up --build --detach docker system prune --force END_TIME=`date +%s` echo Total build time: `expr $END_TIME - $START_TIME`s fidone