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.
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/.envEdit 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 migrateCreate a superuser (admin) running
python manage.py createsuperuserand fill the required fields
python manage.py runserver 3000First, log in using your superuser credentials: Link
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)
nonroot.Dockerfile: describes the steps so the docker image can be built without being root users