CLONE_URL
- Required,Git repository url forhttps://
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 -it --name bloghook --restart=always -d -p 127.0.0.1:8666:8080 -p 127.0.0.1:8665:80 -e CLONE_URL="https://github.com/Leafney/Leafney.github.io.git" leafney/hexo-webhook:latest
8080
github webhook80
hexo blog
$ sudo pip install --upgrade pip
$ pip install -U docker-compose
$ docker-compose -v
$ git clone https://github.com/Leafney/hexo-webhook.git
$ cd hexo-webhook
$ docker-compose build
$ docker-compose up -d
$ ls
docker-compose-hexo.yml
$ docker-compose -f ./docker-compose-hexo.yml up -d
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/build.sh
And then,it works!
If you want to change the default secret of itfanr.cc
,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
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 itfanr.cc
. If you want to change, please compile the golang program main.go
by yourself.
Wellcome Page for Settings:
- webhook secret
- webhook say hello words
- git clone url
- git clone username
- git clone usertoken
- send email notify
- show log detail page
- Select operation branch