diff --git a/hugo/Dockerfile b/hugo/Dockerfile new file mode 100644 index 0000000..963a640 --- /dev/null +++ b/hugo/Dockerfile @@ -0,0 +1,8 @@ +# +# Dockerfile for hugo +# + +FROM scratch +COPY hugo / +WORKDIR /www +ENTRYPOINT ["/hugo"] diff --git a/hugo/README.md b/hugo/README.md new file mode 100644 index 0000000..8bf500a --- /dev/null +++ b/hugo/README.md @@ -0,0 +1,63 @@ +hugo +==== + +![](https://badge.imagelayers.io/vimagick/hugo:latest.svg) + +[hugo][1] 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://:/`. +> 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 in your browser! + +[1]: http://gohugo.io/ diff --git a/hugo-arm/Dockerfile b/hugo/arm/Dockerfile similarity index 100% rename from hugo-arm/Dockerfile rename to hugo/arm/Dockerfile diff --git a/hugo-arm/README.md b/hugo/arm/README.md similarity index 100% rename from hugo-arm/README.md rename to hugo/arm/README.md diff --git a/hugo-arm/docker-compose.yml b/hugo/arm/docker-compose.yml similarity index 100% rename from hugo-arm/docker-compose.yml rename to hugo/arm/docker-compose.yml diff --git a/hugo-arm/hugo b/hugo/arm/hugo similarity index 100% rename from hugo-arm/hugo rename to hugo/arm/hugo diff --git a/hugo/docker-compose.yml b/hugo/docker-compose.yml new file mode 100644 index 0000000..eabcae6 --- /dev/null +++ b/hugo/docker-compose.yml @@ -0,0 +1,12 @@ +hugo: + image: vimagick/hugo-arm + command: > + server --bind=0.0.0.0 + --port=80 + --baseUrl=http://192.168.1.230/ + --watch + ports: + - "80:80" + volumes: + - ./www:/www + restart: always diff --git a/hugo/hugo b/hugo/hugo new file mode 100755 index 0000000..9f2c6ec Binary files /dev/null and b/hugo/hugo differ