Skip to content

Repository files navigation

movie-database

Django-based movie database system built for a DevOps assignment. Uses MySQL for data storage and includes CI/CD pipelines with Jenkins, Ansible deployment, Docker (non-root container setup for improved security by limiting container privileges), and Kubernetes for container orchestration and scalable deployment.

Clone and run project

git clone https://github.com/pauliee99/movie-database.git
python3 -m venv myvenv
source myvenv/bin/activate
pip install -r requirements.txt
cd database
cp database/.env.example database/.env

Install MySQL

Create Database

Edit database/.env to define the MySQL Database you have just created

SECRET_KEY='test123'

DB_NAME='name of database created'
DB_USER='your db username'
DB_PASSWORD='your db password'
DB_HOST='the host db is running'
DB_PORT='the port e.g. 3306 by default for MySQL'

Apply the database migrations running

python manage.py makemigrations
python manage.py migrate

Create a superuser (admin) running

python manage.py createsuperuser

and fill the required fields

Run development server in port 3000 (strictly)

python manage.py runserver 3000

Check for proper running

First, log in using your superuser credentials: Link

Jenkins CI/CD Procedure

Jenkinsfile: describes the procedure so Jenkins server is able to deploy the component using Ansible

docker.Jenkinsfile: describes the procedure so Jenkins server is able to deploy the component in Docker environment (VM)

Docker

nonroot.Dockerfile: describes the steps so the docker image can be built without being root users

About

Django-based movie database system built for a DevOps assignment. Uses MySQL for data storage and includes CI/CD pipelines with Jenkins, Ansible deployment, Docker (non-root container setup), and Kubernetes for container orchestration and scalable deployment.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages