This is a Python-Django project that uses Docker and Nginx. Authentication is handled by Google OAuth.
- Docker
- Docker Compose
- Python3
- Django
Clone the repository:
git clone https://github.com/<username>/<repo_name>.git
cd <repo_name>
Build the Docker image:
docker-compose build
Start the container:
docker-compose up
Visit http://localhost:8000 in your browser to access the application
To use Google OAuth for authentication, you will need to create a project on the Google Cloud Console and obtain a CLIENT_ID and CLIENT_SECRET. Once you have those, you can add them to the settings.py file in the project.
- Django documentation
- Docker documentation
- Google OAuth documentation
Make sure you have created .env file in your root directory and added the necessary environment variables. Make sure you have created credentials.json file in your root directory and added the necessary credentials obtained from Google Cloud Console.
Copy code
docker-compose up --build
docker-compose run --rm web python manage.py makemigrations
docker-compose run --rm web python manage.py migrate
docker-compose run --rm web python manage.py createsuperuser
Add your domain in settings.py file Run and check the configurations.
nginx -t
To restart nginx execute the following command .
sudo service nginx restart
Made with 💖 by Harsh Rathi