Docker Compose with own SSL cert

Hi

I’m new to Docker and trying to get a docker compose file that i can use to install nextcloud with my own wildcard SSL certificate.

I’m able to deploy a insecure version. is there a place where i can place my crt & key & run it on port 443?

I believe so. You would need to get your cert into the Docker container (probably via a mount point) and adjust the web server config accordingly (also inside the container).

i’m a total n00b with this. any help how to do that will be helpful

I’m also looking for something i can run behind the pfsense HAProxy. So do i really need a setup with nginx proxy?

That’s getting into too much to try to explain here. You can find info about configuring volume mount points in the compose file version 3 reference. Many compose file examples use them too.

Put simply, you mount a folder on your host to a folder in the container, and then put your cert in it. It will appear in the mounted folder in the container and can be used by it as normal.

Same for the web server configurations. If you map the config folder to a folder on the host, you can then access the config files from outside the container. Or alternatively you can start a shell in the container and edit them directly.

I use Apache so I can’t really tell you much about HAProxy or nginx.