Open tofumatt opened 6 years ago
(For instance, I wanted to check against an SSL-enabled site for #8164, but wasn't able to as right now the local development server only runs an HTTP site.)
Re-sharing comment from @WraithKenny left in closed PR (https://github.com/WordPress/gutenberg/pull/8212#issuecomment-479205855):
I believe that running the docker-compose
COMMAND
means that it will generate a self-sign cert each and every time you runup
. That means you have to add & trust the cert, or click the "unsafe" link, each time.Perhaps it'd be better to generate the local cert locally, since it's only valid for your own local system. You can create a root folder to hold
openssl
certs, and mount them into the proper place (making them persistent). Additionally, we can also make the sites-enabled and mods-enabled files persist the same way.volumes: - ./ssl/ca.crt:/etc/apache2/ssl/ca.crt - ./ssl/ca.key:/etc/apache2/ssl/ca.key - ./ssl/000-default.conf:/etc/apache2/sites-enabled/000-default.conf - ./ssl/ssl.load:/etc/apache2/mods-enabled/ssl.load
This has the advantage of being able to add the cert and trust it once, and be done with it. It also has the benefit of being able to define your own domains, like
wordpress.test
etc.Finally and alternatively, it might be worth considering placing the certs into a
usr
folder, so the cert can be reused for multiple projects, beyond just this project.
I think we can use https://serveo.net/
to achieve it. what do u think ?
My vote would be:
you can create a cert authority so that all the certs created and destroyed are trusted. you only have to trust the authority https://deliciousbrains.com/ssl-certificate-authority-for-local-https-development/
It would be useful to have an SSL option for the development docker image so we can test mixed-content issues and other things. Obviously it will be a self-signed certificate, but it's pretty easy to add SSL support to the image; it doesn't even require a special Dockerfile or anything like that.