Sign inSign up

steilerdev/hugo

By steilerdev

•Updated over 3 years ago
Archived

A docker container to generate Hugo projects

Image
0

235

steilerdev/hugo repository overview

⁠Docker Container for hugo

This container will take a hugo⁠ project and output the built webpage. Optionally (staticrypt)[https://github.com/robinmoisson/staticrypt⁠] can be used to encrypt areas of the final page.

⁠Configuration options

⁠Environment Variables

The following environmental variables can be used for configuration:

  • CRYPT_PWD
    The password, used in staticrypt. If undefined the encryption step will be skipped.

⁠Volume Mounts

The following paths are recommended for persisting state and/or accessing configurations

  • /src/
    The source location of the hugo project
  • /site/
    The output directory for the built webpage

⁠docker-compose example

Usage with nginx-proxy inside of predefined steilerGroup network, with the site service serving the created page. Uncomment the entrypoint, if you need to access the container, e.g. to initialize the project.

version: '2'
services:
  site_gen:
    image: steilerdev/hugo:latest
    container_name: hugo
    volumes:
      - /opt/docker/hugo/volumes/site:/site
      - /opt/docker/hugo/volumes/src:/src
    environment:
      CRYPT_PWD: "some-pass"
  site:
    image: nginx:latest
    container_name: site
    restart: unless-stopped
    volumes:
      - /opt/docker/hugo/volumes/site:/usr/share/nginx/html:ro
    depends_on:
      - "site_gen"
networks:
  default:
    external:
      name: steilerGroup

Tag summary

Content type

Image

Digest

sha256:de1fed3f0…

Size

208.1 MB

Last updated

over 3 years ago

docker pull steilerdev/hugo