Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Project Django Repository

Overview

This repository contains a Django-based web authentication project. It includes the standard Django project structure, along with configurations for containerization using Docker and CI/CD pipelines via Jenkins and GitHub Actions. The project uses Python as the primary language, with HTML for templates and SQLite for the database. Multiple Dockerfile variants retained for further development and testing of deployment strategies.

Directory Structure

  • .github/workflows/
    Directory containing GitHub Actions workflow files for automating testing, building, or deployment processes. When practiced the Github Actions on alternate to jenkins.

  • app/
    The main Django project directory (acting as the project root). This includes core files such as:

    • settings.py: Configuration settings for the Django project
    • urls.py: URL routing for the application.
    • wsgi.py / asgi.py: Entry points for WSGI/ASGI servers.
  • Dockerfile
    Docker configuration file for building a container image of the Django application.

  • JenkinsFile
    Jenkins pipeline script defining the steps for continuous integration and deployment. (This project was previously deployed in Jenkins and then retained the Jenkinsfile for the use of convertion draft for github actions workflow yaml files..)

  • db.sqlite3
    SQLite database file used for development and testing purposes.

  • manage.py
    Django's main file

  • newDockerFile
    An updated or alternative Dockerfile, for a new deployment configuration.

  • oldDockerFile
    A previous version of the Dockerfile, retained for reference.

  • requirements.txt
    List of Python dependencies required to run the project, including Django and other libraries.

Prerequisites

  • Python 3.x
  • Django (specified in requirements.txt)
  • Docker (for containerization)
  • Jenkins (for CI/CD, if using the JenkinsFile)
  • GitHub account (for Actions workflows)
  • SQLite (included with Python, for testing)

Installation and Usage

  1. Clone the Repository

     git clone https://github.com/branson404/basic-python-django-project.git
     cd basic-python-django-project
  2. Install Dependencies

     pip install -r requirements.txt
  3. Apply Migrations and Run the Server

     python manage.py makemigrations
     python manage.py migrate
     python manage.py runserver

Access the application at http://127.0.0.1:8000/.

  1. Docker Setup

Build the Docker image using one of the Dockerfiles:

docker build -t basic-python-django-project -f Dockerfile .

Run the container:

docker run -p 8000:8000 basic-python-django-project
  1. CI/CD
  • Use the JenkinsFile to set up a Jenkins pipeline.
  • GitHub Actions workflows in .github/workflows/ will run automatically on pushes or pull requests.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages