Based on this article
Pairs with the WordPress Docker repo for easier local development with ssl certificates.
This normally lives alongside all dev projects. i.e. at the root of a ~/dev directory
🔥 Before first run the local network needs to be created by running
docker network create nginx-proxyAfter that you can bring this up using docker-compose up as normal
If this is the first time setting up a cert:
You only need to do this step once - if you already have one then you don't need another for each site.
- install
mkcert- on macos that's
brew install mkcertandbrew install nss
- on macos that's
- run
mkcert -install
If yoy already have a local CA set up:
# cd into the ./certs dir at the root of this repo
mkcert -cert-file example-site.local.crt -key-file example-site.local.key example-site.local