1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00
dockerfiles/hugo
2015-10-19 00:53:56 +08:00
..
arm update 2015-10-19 00:53:56 +08:00
docker-compose.yml update 2015-10-19 00:53:56 +08:00
Dockerfile add hugo 2015-10-19 00:33:01 +08:00
hugo add hugo 2015-10-19 00:33:01 +08:00
README.md update 2015-10-19 00:53:56 +08:00

hugo

hugo makes the web fun again.

Directory Tree

~/fig/hugo/
|-- docker-compose.yml
`-- www/
    `-- themes/
        `-- hyde/

docker-compose.yml

hugo:
  image: vimagick/hugo
  command: >
    server --bind=0.0.0.0
           --port=80
           --baseUrl=http://blog.datageek.info/
           --theme=hyde
           --watch
  ports:
    - "80:80"
  volumes:
    - ./www:/www
  restart: always

WARNING: hugo server is for testing purpose. The default value of --baseUrl option is http://<bind>:<port>/. I set it to the same value as that in config.toml here. It maybe not a good practice.

Up and Running

$ alias hugo='docker run --rm -v `pwd`:/www vimagick/hugo'

$ cd ~/fig/hugo/www
$ curl -L https://github.com/spf13/hyde/archive/master.tar.gz | tar xz --strip 1 -C ./themes/hyde/

$ hugo new site .
$ vim config.toml

$ hugo new post/hello-world.md
$ vim content/post/hello-world.md

$ docker-compose up -d

$ hugo

The last hugo command will use baseurl in config.toml.

Open http://blog.datageek.info/ in your browser!