Full Blog on this Medium tutorial
Live at: https://tusher.site
- Install Docker: Ensure Docker is installed on your system. Install Docker.
- Install Docker Compose: Ensure Docker Compose is installed. Install Docker Compose.
The project has been updated to use Docker and Nginx for deployment. Follow these steps to run it:
git clone https://github.com/tusher16/My-portfolio-project.git
cd My-portfolio-project
sudo docker-compose up --build
django_gunicorn
: Runs the Django app with Gunicorn.nginx
: Serves as the reverse proxy to manage requests.
Once the containers are up and running, the application will be accessible at:
http://localhost (or public domain: https://tusher.site)
By default, this project uses SQLite. If using another database:
- Update the
.env
file with the appropriateDATABASE_URL
. - Run the following commands to apply migrations:
python3 manage.py makemigrations
python3 manage.py migrate
To access the admin interface:
python3 manage.py createsuperuser
- Install dependencies:
pip install -r requirements.txt
- Run migrations:
python3 manage.py makemigrations
python3 manage.py migrate
- Start the development server:
python3 manage.py runserver
Access the application at http://127.0.0.1:8000.
- Dockerized Setup: Added support for Docker and Docker Compose.
- Nginx Integration: Added Nginx as a reverse proxy for production.
- Environment Variables: Centralized configuration with
.env
for sensitive data. - Static and Media Management: Configured Docker volumes for handling static and media files.
Feel free to fork this repository, make your changes, and submit a pull request!