This repo contains the basic layout for the deployment of a hugo website with traefik and docker. The site
folder contains your hugo website and the necessary files. The main idea for this repository is based on the docker image of jojomi.
Modifications to the setup of jojomi
are:
- replacing
nginx
with the speed versionpagespeed/nginx-pagespeed
- replacing the target directory from
/var/www
to/usr/share/nginx/html:ro
- You have installed
docker-compose
, you can install it via setup - Traefik is already running in a different process/container
- you defined an external network for all you
traefik
related containers, if you need to create one just rundocker create yournetwork
- in the
config.toml
no base url is defined, if you define it there you have to comment out the line in thedocker-compose
file
- Put you hugo website into the
site
folder - Create a corresponding folder for the deploy, in the docker-compose file you replace the folder location
/home/username/folder_for_deployment
- Set you network
- Define the Host rule
- run
docker-compose up -d
- You should now your
hugo
website 😊