Ecommerce Shopify WordPress Discussion

ports mapping in nginx docker container

I'm not sure what I don't understand, so it's hard to ask the right question : I configured 3 docker images to create container for a local wordpress, using docker compose with nginx, mariadb, and wordpress. for the nginx container I map the ports like that : docker-compose.yml : services: nginx: ports: - 443:443 If I don't map any ports in the docker-compose.yml file, the localhost website is not accessible with url https://localhost, but I can find the ip address with this command docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nginx_container (that I don't really understant), and the if I try to access the website at the ip, ie. "" it will parially work : the wordpress page will show with missing styles, and the network panel in dev tools reveals that lots of request didn't worked, like the styles .css If I map to "443", without specifying host port, I get the same result. If I map 443:443 in the nginx container, the website works, with https://localhost. If now I map 3002:443 for example, I can't access the website at https://localhost:3002, but it's different than situation (1), I can see a redirection happening Case 3, I think I understand, I tell the nginx container, the only one that need to be connected to the outside of the container network, to listen to host port 443, and maps it to internal network at port 443, default for https, so everything goes smooth Case 1 and 2 I don't understand why it works only partially ? I thought docker allocate a host port, once I find it I can use it to access nginx, and now from inside the container network everything should work as if I was trying to connect to port 443 ? and case 4, the one I'm really interested in, I have no idea why it doesn't work, I thought that docker would do some kind of transformation : everything in host that request port 3002 will be translated in the container network as port 443, but clearly not. I would think that, at least, it would work like in case 1 and 2, but still not. Since I'm not sure what is relevant here, I don't want to add unnecessary content, but I should add that I didn't use the existing docker images, I created my own.
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.