The Nice Thing About No One Reading
Sunday, July 05, 2020
This weekend was the most productive I have been in *ages* on this website. I had a very important realization: No one reads my blog, or my website, who cares if I mess it up? No one. So I dove in after becoming more proficent with Docker and managed to accomplish the following this weekend:
- Dockerized stevenramey.com
- Integrated Docker with pytest and django-pytest
- Added Nginx to my docker-compose.yaml
- Upgraded to Django3 using Daphne
- Started work on using Letsencrypt and Cerbot
Some useful links for the future:
- https://stackoverflow.com/questions/42417919/deploy-to-docker-with-nginx-django-daphne
- https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/daphne
- https://github.com/jfloff/alpine-python/issues/44 (add libffi-dev for my requirements.txt)
- Briliant article on Nginx/Certbot: https://medium.com/@pentacent/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71
Useful things to remember
- If you run into Nginx welcome page issues then delete then add
RUN rm /etc/nginx/conf.d/default.conf
to your (nginx:alpine) Dockerfile
Other nice things to remember
- Aliasing the following has been super helpful for productivity, no longer having to rely on recursive search:
alias dcb="docker-compose build"
, alias dcu="docker-compose up"
, alias dcd="docker-compose down"