Public | Automated Build

Last pushed: 6 months ago
Short Description
Short description is empty for this repo.
Full Description

This blog is build with hugo, which is a static site generator. See Hugo.


On Docker machine, run in the the root dir of this repo:

$ docker build -t blog .

Docker should setup all you need, dependencies, the hugo client and a the settings for the server in nginx.


Once you have the image build, you can run in a container with Docker run:

$ docker run --name blog -d -p 80:80

Verify that is up and running through the 80 port !!


If you want to have a easy way to publish your content without dealing with devops stuff, you can now setup a webhook using github, and docker hub with an automated build repository.

a CI like environment

I'm using an app in Flask that's triggered a script every time docker hub detects a commit from github.

When the commit is made, docker hub build the image, when is finished the webhook make a POST to the server.

You have to define an endpoint.


When is done, the server validate and run the script in app/, if the token is correct then respond to the client in JSON format jsonify(success=True)

if request.method == 'POST':
       token = request.args.get('token')
       if str(token) == str(os.environ.get('TOKEN')):
           return jsonify(success=True)
       return jsonify(success=False), 500

Here is my script look like:

docker pull uzi200/
docker stop blog
docker rm blog
docker run --name blog -d -p 80:80 uzi200/

You can take a look to the repo for the webhook listener app here.

I hope this serve anyone who want a blog without a messy CMS's and complicated things just for blogging !

Docker Pull Command
Source Repository