Simple jekyll app to host my personal blog. Check it out here! (it may not always be up 😉).
The blog is hosted in a K8s cluster. You can see the deployment here. This cluster uses the image created by the Dockerfile, and mounts a volume with this repo cloned. A comanion container is also created to regularly pull the latest changes from this repo into the volume, so that whenever changes are made to this blog repo, they are reflected in the deployemnt, without needing to restart the pods.
To push the image to the container registry, run:
docker login registry.gitlab.com
docker build -t registry.gitlab.com/lucascajal1/k8s/blog:latest .
docker push registry.gitlab.com/lucascajal1/k8s/blog:latestIf you update the docker image, the K8s deployment will need to be updated
To bring up the compose deployment, run:
sudo docker compose up --remove-orphans --force-recreate -dAdd the
--buildflag to force the image rebuild. The website takes a few seconds to be available when installing dependencies on runtime
And stop it with:
sudo docker compose downYou can access the logs while the containers are running with:
sudo docker compose logs -tSee more options in the docs
It would be cool to use tools like Elasticsearch in the future