Skip to content

Instantly share code, notes, and snippets.

View esl4m's full-sized avatar
🎯
Focusing

Islam esl4m

🎯
Focusing
View GitHub Profile
@eslam-mahmoud
eslam-mahmoud / gist:bddece7a407ea920e3600e48756bbd34
Last active January 30, 2021 17:04
create Certbot SSL on Docker Nginx on AWS - digitalocean
https://www.digitalocean.com/community/tutorials/how-to-acquire-a-let-s-encrypt-certificate-using-dns-validation-with-certbot-dns-digitalocean-on-ubuntu-20-04
https://www.humankode.com/ssl/how-to-set-up-free-ssl-certificates-from-lets-encrypt-using-docker-and-nginx
-> https://certbot-dns-digitalocean.readthedocs.io/en/stable/
certbot certonly --dns-digitalocean --dns-digitalocean-credentials ~/digitaloceanapikey.ini --preferred-challenges=dns -d=example.com -d=*.example.com
nano /etc/nginx/sites-available/x-app
ln -s /etc/nginx/sites-available/x-app /etc/nginx/sites-enabled/x-app
sudo service nginx configtest
sudo service nginx restart
@eslam-mahmoud
eslam-mahmoud / buildDockerContainer.sh
Last active January 24, 2019 23:54
sh script to stop current container and remove it and rebuild the image and run the container, can be used after pull new code
#from https://stackoverflow.com/questions/41322541/rebuild-docker-container-on-file-changes
#!/bin/bash
imageName=app
containerName=app-container
docker build -t $imageName -f Dockerfile .
echo Delete old container...
docker rm -f $containerName
@bdeleasa
bdeleasa / wp-rename-set-featured-image
Created July 9, 2015 16:01
A Wordpress plugin that renames the Featured Image metabox and text.