Deploying this Site
Now that the Inovato Quadra is setup and ready to go, I need to put some stuff on it. I’ve always had a need to do more learn more web-technologies (sometimes our day jobs don’t use interesting and new tech).
After searching “whats the best static site generator”, by far the most lauded was jekyll.
Jekyll on WSL
Setting jekyll up is pretty simple, if you already have Windows Susbsystem for Linux installed on your Windows computer. Which I do. Here’s the install guide for windows.
The linked guide has you install ruby 2.5. I found that it didn’t work at all on my WSL. Instead I had to upgrade to ruby2.6.
Here’s the basic rundown (as given by the guide):
Afterwards you go on to run gem update
and gem install jekyll bundler
.
The second command didn’t want to work With ruby version 2.5 on WSL. There were
issues about version that popped up (but I don’t have the output and can’t really
remember what they were). So I had to do this:
Also I’m not sure if this a WSL thing, but all the jekyll cmds need sudo
Now jekyll is up and running on WSL and we can create a site using sudo jekyll new site_name
.
Thats basically how this site was started. The content, theme and configuration of
jekyll can come later.
Serving
I searched around for barebones http servers and landed on using httpd from a busybox container.
Once built (via docker build -t krinkle/www:latest .
), we can create a
docker-compose.yml
file.
docker compose up -d
and were off serving this static site.
Now where are our static site files? The bind mount tells us ./my_site:/home/krinkle/_site
.
This maps the my_site
directory within the current directory on the host machine
(the inovato quadra) to the directory inside the container /home/krinkle/_site/
.
When deploying, if you move my_site
on the host machine to backup location
(like my_site_bak), and then try to put a new my_site folder. The docker container
will not update with the new files. Docker is smart enough to follow the old bind
point even if it’s renamed. Ask me how I know.
Now it’s time to write some content and get rich store the technical steps
I will forget in a few years.