SSL certificate with Let’s Encrypt (Certbot) and Docker

I’m going to use certbot/certbot docker container to generate the SSL certificate provided by Let’s Encrypt

docker run -it --rm \
-v /etc/letsencrypt:/etc/letsencrypt \
-v /var/lib/letsencrypt:/var/lib/letsencrypt \
-v PATH_TO_YOUR_WWW_DIRECTORY:/data/letsencrypt \
-v /var/log/letsencrypt:/var/log/letsencrypt \
certbot/certbot \
certonly --webroot \
--email email@example.com --agree-tos --no-eff-email \
--webroot-path=/data/letsencrypt \
-d example.com -d www.example.com

Disable chrome web security (cors) on MacOs

create a .command file: chrome-cors.command with the following code:

open /Applications/Google\ Chrome.app --args --disable-web-security --user-data-dir="" --disable-features=CrossSiteDocumentBlockingIfIsolating

make sure the chrome application is located in /Applications folder and is called Google Chrome.app
Launch the script from terminal (command line interface): ./chrome-cors.command
in the above example, in order to lunch the script, you have to be located in the same folder where the .command script is located