Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
sudo certbot certonly --manual --preferred-challenges=dns --email diapertestemail@gmail.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d diaper.cf -d *.diaper.cf

 

Cert information

Upon success, you'll see some information similar to below

Code Block
Press Enter to Continue
Waiting for verification...
Cleaning up challenges
Subscribe to the EFF mailing list (email: diapertestemail@gmail.com).

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/diaper.cf/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/diaper.cf/privkey.pem
   Your cert will expire on 2021-03-05. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"

 

Copy cert files to somewhere docker can access and give permission

Create a cert folder under project path, and copy both .pem files into the folder. Then change the permissions by:

Code Block
sudo 

...

chown ec2-user:ec2user ./certs/*

This will allow flask and docker to access the cert files.

 

Specify which yml file to use when launching docker on production (and test) environment

A separate docker-compose config file named docker-compose-prod.yml is created.

Since only production (and test) environment will use this cert. When launching docker, must specify this yml file.

...