Skip to content

pastorsj/blog-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

blog-api Build Status Coverage Status Greenkeeper badge

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

API documentation

Link to Documentation

Setup

See API_SETUP.md

Lets Encrypt with Docker

Creating a certificate

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

Renewing the certificate

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

Running the docker compose file

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)

Renewing the cert manually

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

Releases

No releases published

Packages

No packages published

Languages