hugo

Hugo is one of the most popular open-source static site generators โ€” fast builds, no runtime dependencies.

The files for this example are on Github.

The example

A single blog service builds and serves the site via a multi-stage Dockerfile defined inline with dockerfile_inline:

  1. alpine installs Hugo and builds site/ into public/, using the BASE_URL build arg for hugo build -b.
  2. nginxinc/nginx-unprivileged:alpine serves the built public/ directory.

compose.incus.yaml overrides BASE_URL with the container's static IP so Hugo generates correct absolute links, and adds the static IP, a healthcheck, and a CPU limit.

Usage

incus-compose up

Open http://10.134.32.17:8080/