How to enable https on the owncloud docker of nas

Hello,Coud someone help me to make a Caddyfile
here are my configuration:
owncloud docker and Caddyv2 docker are both installed on my nas(OMV),which lan ip is
owncloud access webui is, and which is already port-forword by my main router
main router is enabled ddns function and has a domion( and ssl file (key and crt)

#Doker owncloud
docker run -d \ --name=owncloud \ -e OWNCLOUD_DOMAIN=localhost:8080 \ -p 8080:8080 \ -v /mnt/owncloud:/mnt/data \ --restart unless-stopped \ owncloud/server:latest

#Doker caddy v2
docker run -d
–name caddy
-e “ACME_AGREE=true”
-e “CADDYPATH=/etc/caddycerts”
-v /opt/caddy/certs:/etc/caddycerts
-v /opt/caddy/Caddyfile:/etc/Caddyfile
-p 80:80 -p 443:443
–restart unless-stopped