Electric Eel - How I am using Dockerfile, .env files, compose files

include:
  - path: /mnt/tank/Data/Compose/Ubuntu/compose.yml
    env_file:
      - /mnt/tank/Data/Compose/.env.global
      - /mnt/tank/Data/Compose/Ubuntu/.env

Indeed, this seems to work for variable for the compose interpreter and variables for inside the container.
Sorry for the back and forth.

Here is an explanation how to add your own app icon. How to change icon of custom app? - #25 by adelzu

1 Like

It’s ok, my bad at first for not understanding the specifics and not taking the time to actually see what you are saying. Yes, I change the custom icons myself, thanks for posting and hopefully it exists in Truenas soon. I just wanted to give you a non change Truenas option that is native docker.

What’s weird is it does work to me, but, it’s a semi well known docker workaround that has worked for many many years as docker has never responded to the github issue for your requirement (from someone else). I believe they suggested it originally.

1 Like

So I’m kind of a dummy when it comes to Docker, specifically when it comes to Dockerfiles, as I’ve never had occasion to use them before. So I create $SOMEDIR, and in that create Dockerfile mostly as above (though with Cloudflare because I’m using that), compose.yaml mostly as above, and .env containing my admin email and API credentials.

Then create a custom app containing:

include:
  - $SOMEDIR/compose.yaml

Straightforward enough–but where does the custom Caddy image get built? It has to, right, to include those two plugins? Or does the (effective) docker compose up -d build that as part of the process?

Edit: Well, nothing like just giving it a try. And the answer is, yes, docker compose up does build the Dockerfile. It works, Homepage proxies behind it with just two labels (vs. five with Traefik), and of course Caddy’s configuration is considerably simpler than is Traefik’s. Now a bit of conversion to do on my apps. And work out how to expose Caddy’s API to Homepage…

7 posts were split to a new topic: Dockerfile, Caddy, and qBittorrent, oh my!

I found this through Techno Tim’s recent video. Just wanted to drop some appreciation. I’ll be trying this out soon.