Skip to content

pauliee99/movie-database

Repository files navigation

movie-database

Django database system for devops assignment test jenkins-test2

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 database for devops assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published