Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (39 sloc) 1.51 KB


Github Hook Service for

Prepare the site directory


mkdir -p $WORKDIR/webroot
mkdir -p $WORKDIR/redis_data
mkdir -p $WORKDIR/logs

git clone
git submodule init
git submodule update

# Copy `environment.rc` to $WORKDIR and edit it according to your configuration

Build the image

# Build `gnailuy/jekyll` first. See:

# In the `server` directory
docker build -t gnailuy/githook_server .

# In the `worker` directory
docker build -t gnailuy/githook_worker .

Run on Docker


# Create network (run once)
docker network create githook

# Run redis
docker run -d --restart unless-stopped --network githook --name redis -v ${WORKDIR}/githook/redis/redis.conf:/etc/redis/redis.conf -v ${WORKDIR}/redis_data:/data -t redis redis-server /etc/redis/redis.conf

# Run the worker
docker run -d --restart unless-stopped --network githook --name githook_worker -v ${WORKDIR}/ -v ${WORKDIR}/webroot:/app/webroot/ -v ${WORKDIR}/logs:/app/logs/ -t gnailuy/githook_worker

# Run the server
docker run -d --restart unless-stopped --network githook --name githook_server --env-file ./environment.rc -v ${WORKDIR}/logs:/app/logs/ -p 20182:20182 -t gnailuy/githook_server

Connect to redis

docker run -it --network githook --rm redis redis-cli -h redis
You can’t perform that action at this time.