HTTPS docker compose with ssl certificate

hello everyone in advance thanks for helping me those who have knowledge about my problem.

I want to display my application that is developed in php and apache, inside a docker compose container.

but since I am new to docker I cannot do it so that in the server it makes the requests by https and not by port 8080, I have read some tutorials without success, I hope you can help me guiding me, I attach the image of my two configuration files

In your “ports” section you map your hosts ports to the ports in the container.
Rightnow you map your port 8080 to the containers port 80 and your port 8081 to the containers port 443.
The default port of HTTPS is 443, so all you need to change is the mapping “8081:443” to “443:443”
While you’re at it you can also change the first port mapping to map your port 80 to the containers port 80. This will make your container also work with HTTP.

hello I tried that way but when calling https: // … this does not resolve and no connection server comes out