Hugo
Setting up an hugo site for blogging, with the intention that I will become better at writing down stuff I do and that I might whant to remember that I done and how since memory is none existant.
To get code syntaxing to work with reStructuredText I had to install python2-pygments in addition to hugo
dnf install python2-pygments
Web server
Did an nginx installation in docker to serve the static pages, rather crudly
Dockfile
FROM nginx:latest COPY ssl.conf /etc/nginx/conf.d/ssl.conf
ssl.conf
server { listen 443 ssl; server_name minoris.se; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; ssl_session_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { root /usr/share/nginx/html; index index.html index.htm; } }
Let's encrypt
I referenced this page https://fedoramagazine.org/letsencrypt-now-available-fedora/ included here since they descripbe revokation procedures and similar things that I wont go into
With that information I made an docker container for this as well.
This is the letsencrypt command I decided to run, /ssl, /webroot and /etc/letsencrypt are volumes in the docker container /ssl and /webroot are shared with the nginx container Replaced recovery@example.com with my own email address
letsencrypt \ --text \ --renew-by-default \ --email recovery@example.com \ --domains www.minoris.se,minoris.se \ --agree-tos \ --webroot \ --webroot-path /webroot/ \ certonly
Dockerfile
FROM fedora RUN dnf install -y letsencrypt COPY renew.sh /renew.sh ENTRYPOINT ./renew.sh
renew.sh
#!/bin/bash letsencrypt --text --renew-by-default --email recovery@example.com --domains www.minoris.se,minoris.se --agree-tos --webroot --webroot-path /webroot/ certonly && \ cp /etc/letsencrypt/live/www.minoris.se/privkey.pem /ssl/nginx.key && \ cp /etc/letsencrypt/live/www.minoris.se/fullchain.pem /ssl/nginx.crt
Then all I have to do is start this container and restart the nginx container once every month and it should all be good