Skip to content

Instantly share code, notes, and snippets.

@ayazzali
Last active August 27, 2022 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayazzali/698db9dc86fbe88d3f0113e041e61c13 to your computer and use it in GitHub Desktop.
Save ayazzali/698db9dc86fbe88d3f0113e041e61c13 to your computer and use it in GitHub Desktop.

Instruction docker nginx-certbot

  1. open https://github.com/wmnnd/nginx-certbot
git clone https://github.com/wmnnd/nginx-certbot.git
cd nginx-certbot/
ll
nano init-letsencrypt.sh
nano data/nginx/app.conf
./init-letsencrypt.sh
docker ps
ll data/certbot/conf/
cd ../
ll
#check and rename ls_data_certbot: uncomment !!! mv nginx-certbot/data/certbot/ ls_data_certbot
  1. copy/change app.conf to YOURS mynginx.conf

  2. create nginx.Dockerfile

  3. copy docker-compose.yml

    • change volume (ex: /mnt/storage/ls_data_certbot)
    • delete volume-nginx.conf
      • add nginx-build-context-dockerfile
    • delete old port 80
    • change networks - if u using it

DONE !!!

see example on leasing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment