Skip to content
Go Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

gin for hexo blog through webhook automatic deployment


Docker Env

  • CLONE_URL - Required,Git repository url for https://
  • USER_NAME - The item is set when using a private repository,for username.
  • USER_TOKEN - The item is set when using a private repository,for user token. more info

Docker run

$ docker run -it --name bloghook --restart=always -d -p -p -e CLONE_URL="" leafney/hexo-webhook:latest
  • 8080 github webhook
  • 80 hexo blog

Run by Docker-Compose

install docker-compose
$ sudo pip install --upgrade pip
$ pip install -U docker-compose
$ docker-compose -v
docker-compose local file
$ git clone
$ cd hexo-webhook
$ docker-compose build
$ docker-compose up -d
docker-compose by dockerhub image
$ ls
$ docker-compose -f ./docker-compose-hexo.yml up -d

build ONCE after Docker run

After the container starts, visit the browser to display 404 pages. You need to get online blog files first to the container.

$ docker exec bloghook /bin/sh /app/

And then,it works!

go build

If you want to change the default secret of ,you need to compile the golang program by yourself.

Compile the golang program for linux :

$ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go

view logs

The main log files directory is /app/logs/ in container. You can see it by the following commands:

$ docker exec -it bloghook /bin/sh
$ cd /app/logs
$ vi ginweb_stdout.log


The default webhook secret is If you want to change, please compile the golang program main.go by yourself.


Wellcome Page for Settings:

  1. webhook secret
  2. webhook say hello words
  3. git clone url
  4. git clone username
  5. git clone usertoken
  6. send email notify
  7. show log detail page
  8. Select operation branch
You can’t perform that action at this time.