Skip to content

Instantly share code, notes, and snippets.

Last active Feb 8, 2018
What would you like to do?
Useful commands


export EDITOR=nano
crontab -e
crontab -l


  • docker-compose up
  • docker-compose down
  • docker exec -it $container_name bash
  • docker exec -it $container_name bash -c 'python $command'
  • docker-compose logs -f --tail=500 $service


  • Debian: apt update && apt-get install python-certbot-nginx

  • CentOS: sudo yum -y install epel-release && sudo yum -y install python-certbot-nginx

  • certbot --nginx -d -d

  • docker run --rm -p 443:443 -p 80:80 --name letsencrypt -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" certbot/certbot certonly -n -m "YOUR_EMAIL" -d --standalone --agree-tos

  • cd /etc/nginx/

  • openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/cert.key -out /etc/nginx/ssl/cert.crt

  • openssl genrsa -out /etc/nginx/ssl/ca.key 2048

  • openssl req -new -x509 -key /etc/nginx/ssl/ca.key -out /etc/nginx/ssl/ca.crt

  • openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048

  • openssl genrsa -out /etc/nginx/ssl/xprende.key 2048

  • openssl req -new -key /etc/nginx/ssl/xprende.key -out /etc/nginx/ssl/xprende.csr

  • openssl x509 -req -in /etc/nginx/ssl/xprende.csr -CA /etc/nginx/ssl/ca.crt -CAkey /etc/nginx/ssl/ca.key -CAcreateserial -out /etc/nginx/ssl/xprende.crt

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