Welcome to our comprehensive course on building a fully functional and production-ready Django project! This course is designed to provide you with a step-by-step guide through the entire process of creating a robust web application – a Digital Resume with an integrated lightweight shop – that will be ready for deployment and accessible to the public.
In this hands-on course, we will delve into the world of Django, one of the most popular and powerful web development frameworks, to build a feature-rich web application that showcases your skills, experience, and achievements in a digital resume format. Additionally, we will incorporate a lightweight shop to offer products or services, enhancing the overall functionality and user experience.
- Docker & Docker Compose (Local Development with Docker)
- Navigate to your development directory and open a terminal.
- Clone the development repository:
git clone -b 00-start https://github.com/bobby-didcoding/build-and-deploy-dockerised-django-app-handbook.git .
We need a new .env file to store our project secrets and api keys.
#Unix and MacOS
cp env_template .env
#windows
copy env_template .env
Use the following command to build the docker images:
Make sure Docker is running on your machine!
-
Open a terminal on your machine.
-
Optional step! Prune docker. You may want to prune un-used Docker images and containers.
docker system prune
-
Fire up a dev Docker container.
Note: you may want to prune un used Docker images and containers
docker-compose up -d --build
You should now be up and running!
Note: Open an incognito browser when testing your project (Ctrl + Shift + N)
- Main site is running on http://localhost:8000
You can run Django commands as normal by accessing the Django app
image.
The following example display all files in the container
docker exec -it app bash
ls
exit
The following example will rebuild one container
docker-compose -f up -d --no-deps --build app
Each branch has its own LECTURE_OVERVIEW.md
file that describes what we will cover during the lecture.