I have been very frustrated with the way TrueNAS handles docker compose files. I found a workaround that makes it a lot better.
What’s The Problem#
The TrueNAS app experience is okay as long as you only use the apps as is and only a handful of them. When many apps are installed managing them starts to be a lot of work. This is especially true with apps that are installed using docker compose. TrueNAS has a very small text editor which is difficult to use with large compose files and has no concept of version control. This is a big issue when troubleshooting and a lot of changes are made.
The Workaround#
The solution or rather the workaround is to use the docker compose feature to include another docker compose file. This way only one line has to be in the docker compose exposed in the UI. By including a file placed in a git repository we get version control and can easily go back to a previus version if need be.
include:
- /path/to/your/compose.yaml
Not Perfect#
The nice thing about this approach is that the apps can be managed via the TrueNAS UI as normal. The bad thing about this approach is that it is managed via the TrueNAS UI. It is still necessary to press edit and save for any changes to take effect. Which is very annoying expecialy when making lots of changes.
Another issue I have discovered with docker compose in TrueNAS in general is that when using the latest tag on docker containers it does not work. Only when using a specific version tag does docker pull the latest version. For what I can see there is no option to use the docker compose flag –force-recreate.
I wish I could just manage docker compose via the terminal on TrueNAS like any other Linux. However, this will do for now. I could have cause just run docker in a VM. I used to do that when TrueNAS was FreeBSD based and it worked. But, adds overhead both on the system and on me that has to keep the VM up to date. I am hoping TrueNAS makes it easier to manage in a not so distant future.

