Blog with:
- Backend and Authentication: Django
- Frontend: Bootstrap and Django Template
Run your database and add the database name, user, password and host in the .env
file
Make sure to also add the secret key to the .env
file; you can generate a new one by heading to the path where the file generate_secret_key.py
exists and run the following command.
- You may change the
.env.sample
file to.env
file to test the project.
cd blog/
python generate_secret_key.py
Install virtual environment
pip install virtualenv
python -m venv env
Activate virtual environment.
cmd: env\scripts\activate
bash: source env/scripts/activate
Install dependencies
pip install -r Requirements.txt
Navigate to base directory and run server
cd blog/
python manage.py runserver
In the root directory run the following
- Build and run the container
docker build -t `CONTAINER NAME` .
docker-compose run -it `CONTAINER NAME`
- Since we are using docker-compose we will use
docker-compose build
docker-compose up
- Run the container in the background without going into it
docker-compose up -d
- Check all the containers that are currently running
docker-compose ps
- Get into the running container
docker-compose exec -it `CONTAINER NAME` bash
- Stop the running container
docker-compose down
docker-compose stop `CONTAINER NAME`
You may contribute to this project by creating pull request, make sure linting and CI passes. You may check for issues during linting by adding required files to test-requirements.txt
and then running
pylint blog/**/*.py
This project is licensed under the MIT License - see the LICENSE file for details.