Go to file
TBK 5912fc8963
Initial commit
2019-07-24 21:54:07 +02:00
site-example Initial commit 2019-07-24 21:54:07 +02:00
.drone.yml Initial commit 2019-07-24 21:54:07 +02:00
.gitignore Initial commit 2019-07-24 21:54:07 +02:00
Dockerfile Initial commit 2019-07-24 21:54:07 +02:00
LICENSE Initial commit 2019-07-24 21:54:07 +02:00
README.md Initial commit 2019-07-24 21:54:07 +02:00
docker-entrypoint.sh Initial commit 2019-07-24 21:54:07 +02:00

README.md

Zola

Build Status Docker Pulls Github Stars Github Forks

Intro

Zola setup based on Alpine, Nginx & Drone CI for use with Træfik

This design has two distinct parts.

The first part is the jjtc/zola image (main purpose of this repo) which is used for generating the static site (zola build).

The second part (see the site-example folder) is the files used to maintain/generate your site.

Setup

Requirements

  • zola installed locally for first time setup
  • Git repo
  • Drone CI (Cloud with GH or git + own instance)
  • Docker image repo

Description

The Zola files, your content, Drone CI and Nginx files will live in a git repo dedicated to a specific site (e.g. testsite_com).

Drone CI will use the zola image (jjtc/zola:latest) to generate the static output and then build a new "website" image based on Nginx, static output and the Nginx config files (found in site-example).

Steps

Init

To get started, do the following: run zola init, copy all of the files from site-example into the newly created site project folder, cd to the folder and init a new repo (git init).

Update .drone.yml to match your Docker Hub repo. Update Drone CI with the docker_username and docker_password info and lastly modify the Nginx files to fit your needs.

Remember to add, commit and push.

Update content

Push all of the content changes you desire, when the "website" image should be updated push a git tag and Drone CI will take care of the rest. I recommend using the current date for the tag.

Update production

Either configure the CD part of .drone.yml to make Drone CI handle the rollout of the new Docker image or access your production box (ssh...) and run

docker-compose pull && docker-compose up -d

See docker-compose.yml found in site-example.

Note

Currently you have to manually init the site locally with zola init and go through the interactive setup process. Atm it is not worth the effort to automate the process, that might change in the future in which case the setup instructions above will be updated.