Closed andrewhowdencom closed 7 years ago
Service workers only work on sites using HTTPS (More info), so changing the dev site to run HTTP would make it untestable.
Internally we run our docker environments behind jwilder/nginx-proxy, which can proxy HTTPS requests into a HTTP backend and set the HTTPS=on
environment variable to let Magento know that SSL termination is happening.
I agree that without knowing the above there's a disconnect between docker container setup and the base URL, but switching the environment to HTTP will not improve it as the service worker features will just stop working. Unfortunately, it's not possible to make varnish
listen on 443 as it doesn't support that. Maybe the best solution is to update the readme and make it clear that it needs a web proxy that terminates SSL in front of it.
The docker-compose setup exposes port 80 on a random host port, however the base URL is set to https (and thus 443). This renders the site inaccessible by default.
This commit changes the base URL to http, so that the IP of the container can be added to the hostfile and the site accessed as normal.