#ntier_application
THE ROOT OF THE PROJECT DOES NOT RETURN A PAGE, THIS DOES NOT MEAN THE REST OF THE PROJECT IS BROKEN
Setup steps
- docker-compose build
- docker-compose run web python3 manage.py migrate
- docker-compose up
- navigate to localhost/data/insert_data
- Refresh a few times
- navigate to localhost/data/select_data
- ???
- Profit
Resources Used
- https://docs.docker.com/compose/django/
- https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html
- https://github.com/dockerfiles/django-uwsgi-nginx/blob/master/Dockerfile
- https://stackoverflow.com/questions/33992867/how-do-you-perform-django-database-migrations-when-using-docker-compose
- https://docs.djangoproject.com/en/2.1/intro/tutorial01/
Full Disclosure
Due to my inexperience with Docker, I went through this challenge and worked through some of the kinks to develop a better understanding of what I was doing and the places I'd probably have issues, before actually attempting it, I regarded this as planning. Ultimately I learnt a let throughout this challenge, and I have really enjoyed Docker.
Things that could be improved
- Handle django migrations in a more Docker like way, I've seen people using separate containers to handle this.
- Utilise uwsgi's emperor mode.
- Make the data pages prettier, I'm no frontender lol.
- The overall root index caused me issues with the entire page, so it looks ugly.