Yes! it works!
I had to change a couple of things, but it is almost as the first thread you linked.
In Caddyfile i had to write it like this
Which is a bit different than written in the thread.
forum.mydomain.com {
reverse_proxy unix//sock/nginx.http.sock
import cloudflare
}
and I’ve added the volume, which of course makes sense when i now think of it.
I’m using docker-compose.
caddy:
container_name: Caddy
build:
dockerfile: ./caddy-config/Dockerfile
context: .
labels:
com.centurylinklabs.watchtower.enable: "false"
ports:
- 80:80
- 443:443
volumes:
- ./docker_configs/caddy/data:/data
- ./docker_configs/caddy/Caddyfile:/etc/caddy/Caddyfile
- ./docker_configs/caddy/srv:/srv
- /var/discourse/shared/standalone:/sock
restart: always
Thanks alot for the help!