Setting HTTPS (XWiki in Docker on Mac, with domain name rerouted from Digital Ocean server via WireGuard)

I recently set up an XWiki website that runs on a Docker container on Mac (Docker Desktop). When reaching the domain name, traffic goes to the Digital Ocean server (having the IP attached to this domain name), then WireGuard port-forward it and masquerade it (for now http, via port 80) to the Mac to reach XWiki via the localhost (port :8080).

This setup works well, however I’m struggling to make it HTTPS. I apparently need to set up the Virtual Host to allow HTTPS on Tomcat, but there is no Tomcat folder of any kind in there… and the only mention of Tomcat was when I started XWiki with:
docker run --net=xwiki-nw --name xwiki -p 8080:8080 -v /my/path/xwiki:/usr/local/xwiki -e DB_USER=xwiki -e DB_PASSWORD=xwiki -e DB_DATABASE=xwiki -e DB_HOST=postgres-xwiki xwiki:lts-postgres-tomcat

Any idea or tips to figure this out?
Thank you,

Edit: I was able to get an SSL certificate as well with Let’s Encrypt.

Ok, I figured out where is Tomcat folder, within the Docker image volume.
I copied the Tomcat/conf to the host (the Mac), now when doing:
docker run --net=xwiki-nw --name xwiki -p 8080:8080 -v /Users/username/xwiki:/usr/local/xwiki -v /Users/username/tomcat:/usr/local/tomcat/conf -e DB_USER=xwiki -e DB_PASSWORD=xwiki -e DB_DATABASE=xwiki -e DB_HOST=mysql-xwiki xwiki:lts-mysql-tomcat

I get docker: invalid reference format: repository name must be lowercase.
I guess the XWiki tutorial on Setting Tomcat is based on Ubuntu, but on Mac the path contains /Users/username/ so is Upper case.

Is there a fix for that?

1 Like

My bad, I just missed a -v argument.
No more error.