Skip to content

Blog

Managing dockers using ansible on Synology NAS

Ansible docker

Synology NAS devices are great and easy to use devices. The model I use is plenty strong to running a few containers as well. However, the Synology Docker application is not the best when it comes to managing multiple containers. It is a bit clunky and does not provide the flexibility I want.

Managing containers is very well possible using Ansible. Especially when you already use it for different systems and different tasks. Adding a playbook to allow you to update or manage your containers is a no-brainer.

Taskfile magic with docker[-]compose

Taskfile magic with docker compose

I have been using Taskfile for a while now, and I really like it. It is a great alternative to Makefile, and it has some nice features that make it easier to use.

In this post I wanted to share some "magic" to be able to select the right docker compose application to use. Either the older docker-compose or the newer docker compose command, using the compose plugin.

Convert poetry to uv

poetry2uv When I encountered #uv I fell for it right away. I was already using ruff for a while and started looking into rye, which was the intermediate step before it became uv.

Creating a uv repo is easy, just run uv init $project and you are off to the races. Using it for new projects is easy if you are already used to poetry. The commands are quite similar. Just add a few libraries with uv add $library or uv add --dev $library to make it part of the development group.

Improved shebang for your python standalone script

uv shebang

Sometimes you just want a script, without having to specify a virtualenv or polluting your global python environment. Given PEP-0723 we can build scripts as we would normally, though now add a few comments to it to specify the dependencies.

When we combine that with uv we can easily run the script without having to activate a virtualenv or specify the python interpreter. And it will just take care of it. Assume the script has the name script.py we would call it with uv run -s script.py.

Paperless

Paperless

Recently I was helping out some friends with paperless, how to structure their documents, how to implement a flow for their documents, etc. On occasion this triggered me to look at how I use paperless myself. I've been using it for a while now and I'm very happy with it. I've also added some automation to it, which I'll share in this post.

Pypi Trusted Publisher Management and pitfalls

security pipeline Be the cool kid on pypi, I thought, use the Trusted Publisher Management and OpenID Connect (OIDC)... I thought...

While working on my latest repo convert_poetry2uv, I wanted to automatically push the builds to pypi. Traditionally a username/password combination was used, which was later replaced by an API token. These days OIDC can be used, which I tried. I'm here to share some pitfalls, so hopefully you don't fall in them.

Contact form made simple

form Today I ran into a service that allows you to create a contact form without having to write a bunch of code. Making it really easy to incorporate it in your mkdocs website.