How did I make this website? Well, I used Obsidian.md, the note-taking program which I have been using for a long while, in combination with Quartz, a program that turns the Obsidian notes into a website.
The setup process I used is as follows:
- I connected to my Ubuntu server.
- I installed the necessary dependencies for Quartz.
- I cloned the Quartz repository.
- I added my content (Obsidian notes) to the content folder.
- I ran
npx quartz build
to generate the static HTML files. - I created a Docker container running Nginx, mounting the generated public folder (which contains all the HTML files) as a volume.
- I connected this Nginx container to Traefik for reverse proxying.
- I configured my domain name to point to the server.
There are a lot of technologies here that I hope to document better on this site. Many people are not familiar with Ubuntu, Traefik, Nginx, Docker, etc. This will be a good platform to publicly share this information with my friends.
Can I use rsync to copy the public files to another location then mount the Nginx container to the new location. Then when rsync reconises file changes to the public folder, it will push it to the inbetween folder for Nginx.
Fixing the docker bind mount issue
Each time you run npx quartz build
, it recreates the public dir, which destorys the docker bind mount. I sloved this issue by using a intermidie dir.
#!/bin/bash
# Andrew Shade
# Sync Files to intermedate dir since docker bind mounts dont work with the origianl public dir due to it being recreated every build.
# 6/30/25
cd /quartzRepoLocation/
npx quartz build
if [ $? -ne 0 ]; then
echo "Quartz build FAILED!"
exit 1
fi
echo "Build Done"
rsync -a --delete /public1 /public2
if [ $? -ne 0 ]; then
echo "Rsync FAILED!"
exit 1
fi
echo "Sync Done"
Fitness Discipline