A simple api for storing users and blogs. This is specifically used for my personal blog, which may or may not be up at this point. If it is, please feel free to read through it. Thanks!
Link to my blog
See API_SETUP.md
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 "[email protected]" -d blog.sampastoriza.com --standalone --agree-tos
docker run --rm --name letsencrypt -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" -v "/usr/share/nginx/html:/usr/share/nginx/html" certbot/certbot:latest renew --quiet
docker-compose -f docker-compose.yml up --build --force-recreate
Running in the background
docker-compose -f docker-compose.prod.yml up --build --force-recreate -d
Restarting all containers
docker restart $(docker ps -q)
Stopping all containers
docker stop $(docker ps -q)
I have had problems trying to create a cron job, so I run this manually to regenerate the certificate. Docker will then use the folder that has the generated certificates as volumes when creating the nginx docker container.
sudo certbot certonly -d blog.sampastoriza.com