Crontab
export EDITOR=nano
crontab -e
crontab -l
Docker
docker-compose up
docker-compose down
docker exec -it $container_name bash
docker exec -it $container_name bash -c 'python manage.py $command'
docker-compose logs -f --tail=500 $service
OpenSSL
-
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 example.com -d www.example.com
-
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 example.com --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