How can I address/manage external file references in Docker Compose with Dockge?

I’m on ElectricEel-24.10.2

I’ve been using the official Dockge app in TrueNAS and then managing all of my remaining applications from there through Dockge.

I’m really happy with it and most things work great.

However, there are certain cases that I haven’t figured out yet: some publicly available docker compose files include references to external files. Typically, they look like this: “./someConfig.yaml”

Here is a real world example: Docker Container Monitoring with cAdvisor, Prometheus, and Grafana using Docker Compose | by Soham Mohite | Medium

What is the best practice for inserting/creating those external files as a Dockge user? Is there a way to add them directly in Dockge? Through the CLI? Should I share some config drive and put them all there? And also, where do they go exactly? ie. does “./” refer to the root “stacks” directory?

AFAICT, there’s no way to do this in Dockge. Dockge only allows you to copy-and-paste a single Yaml file, plus a single “.env” file with some environment variables.

So if your application has multiple yaml files, the way to handle this is to simply make your own custom yaml file using the contents of those files, and paste this into Dockge’s editor. This is what I did with Immich, for instance.

Thank you.

So, I would create a new “compose” entry in Dockge for each other file (yaml only? The one I linked to includes a json too!)?

What would the implications be for the pathing? How would I reference them via the “main” compose file?

No, each “compose” entry in Dockge should be for an entire application. Each “compose” entry results in a separate docker container (or multiple containers, if your yaml file has multiple services defined, though I don’t recommend this).

There won’t be any paths in the resulting yaml file. Wherever you see a yaml file included, you have to remove that line, and replace it with the contents of the referred file. In the end, you’ll wind up with one monstrous yaml file with everything in it. You might be able to eliminate some stuff: when I set up Immich, for instance, it points to a couple of extra yaml files (one for transcoding, one for something else I forget). Some of that stuff might not be applicable to your setup. For me, the transcoding file had a bunch of options, for all the various hardware vendors. I just left out the parts I didn’t need and included the part I did based on my hardware, so I ended up just adding one line from that file to my main Immich yaml file (it was for the /dev/dri device I think).

Aha. Makes sense. Thank you for clarifying.