Operating system: TrueNas ElectricEel-24.10.2.4
Docker environment: DockGe | App Version: 1.5.0 | Version: 1.2.14
Trying to install: Caddy
For the sake of formating, I have a google doc created that I’ve been using to document my steps, here it is: Caddy - Google Docs
Any help is appreciate it, sorry if it’s a stupid question.
Setup:
-
I have a dataset dedicated to all the -arr apps, and will be adding a folder for caddy in there instead of creating a new dataset
-
I have very limited experience with docker, I set up qbittorrent and jfa-go, that’s pretty much it, sorry if the post is a dumb question, I tried looking through forums and documentation and couldn’t find an answer.
Prep:
-
Will be using DockGe
-
Using this video https://www.youtube.com/watch?v=ZOtUco5EwoI&t
-
Using DNS challenge
-
From my understanding I’ll have to have a specific file system
-
From what I understand all files need to be created before the compose is ran in DockGe
-
In the compose 2 volumes should be added, 1 for the config, 1 for the data
-
Need to manually mount the Caddyfile and Index.html
-
I will be using cloudflare for DNS
Steps:
-
I have created the file system
-
Created Zone-Zone-Read and Zone-DNS-Edit Cloudflare token
-
Edited .env file accordingly
-
Added the following 2 folders, and mounted them as volumes in the compose yaml
- /mnt/NAS 16TB 2 Vdevs Mirrored /arr-apps/Caddy/Config:/config
- /mnt/NAS 16TB 2 Vdevs Mirrored /arr-apps/Caddy/Data:/data
- Leaving the following 2 lines as is now, hoping that it’ll be able to find the caddyfile and index.html on it’s own in the folder, if not then I’ll try to specify the path as I did with the data and config folders
- ./Caddyfile:/etc/caddy/Caddyfile
- ./index.html:/usr/share/caddy/index.html
-
Edited caddyfile to reflect my dns
-
Probably missing something
-
From what I understand I don’t portainerportainerneed CSR and ACME certificates saved in my truenas certificates tab when using reverse proxy with caddy, as it pulls it automatically from CF.
-
Going to try spinning it up
-
I assume that pasting the compose yaml will auto build it, and add the caddy network on it’s own since both the build and network commands are in there
-
Pasting the compose and hoping for the best
[+] Building 0.2s (1/1) FINISHED docker:default => [caddy internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 2B 0.0sfailed to solve: failed to read dockerfile: open Dockerfile: no such file or directory
-
Looks like I’ll have to specify the file dir for dockerfile like I did for the config & data folders
-
Based on a stack overflow post, I should just use:
context: . dockerfile: <Below_Directory>/Dockerfile
- Adding that
Compose can now delegate builds to bake for better performance. To do so, set COMPOSE_BAKE=true.[+] Building 0.0s (0/0) docker:defaultresolve : lstat /mnt/NAS 16TB 2 Vdevs Mirrored : no such file or directory
-
No such file or dir
-
Stuck
-
Tried changing the path syntax to ./mnt/NAS 16TB 2 Vdevs Mirrored /arr-apps/Caddy/Dockerfile.txt
-
No luck, tried changing it again many times, same issue
-
Not sure how to specify the dockerfile path in dockge