0% found this document useful (0 votes)
22 views4 pages

Cloud Capstone

The Flight Management System is a Python Django application designed to optimize flight operations with features such as scheduling and passenger management. The project utilizes Docker for containerization, enhancing deployment and scalability. The document outlines the steps for setting up the application, including creating a Dockerfile, defining dependencies, and running the application in a Docker container.

Uploaded by

Srikanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Cloud Capstone

The Flight Management System is a Python Django application designed to optimize flight operations with features such as scheduling and passenger management. The project utilizes Docker for containerization, enhancing deployment and scalability. The document outlines the steps for setting up the application, including creating a Dockerfile, defining dependencies, and running the application in a Docker container.

Uploaded by

Srikanth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DATE: CAPSTONE PROJECT

FLIGHT MANAGEMENT SYSTEM

INTRODUCTION:
The Flight Management System project is a Python Django application
designed to streamline flight operations. It offers features like flight scheduling,
passenger management, crew assignment, and inventory tracking. By leveraging
Django's robust framework, the system ensures efficient data management and user
interaction. Dockerizing the application involves containerizing it for easy deployment
and scalability. With Docker, the project gains portability and consistency across
different environments, simplifying the deployment process and enhancing system
reliability. This approach facilitates seamless integration into existing infrastructure and
enables rapid deployment of updates and enhancements to the Flight Management
System.

PROCEDURE :
Step 1: Define the application dependencies
1. Create a directory for the project:
$ mkdir flight_management_system
$ cd flight_management_system

Step 2: Create a Dockerfile and add the following code:


# syntax=docker/dockerfile:1.4
FROM --platform=$BUILDPLATFORM python:3.7-alpine AS builder
EXPOSE 8000
WORKDIR /app
COPY requirements.txt /app
RUN pip3 install -r requirements.txt --no-cache-dir
COPY . /app
ENTRYPOINT ["python3"]
CMD ["manage.py", "runserver", "0.0.0.0:8000"]

FROM builder as dev-envs


RUN apk update && apk add git
RUN addgroup -S docker && adduser -S --shell /bin/bash --ingroup docker
vscode
CMD ["manage.py", "runserver", "0.0.0.0:8000"]

Step 3: Create a requirements.txt file and add the necessary packages:


Django==3.1.2
reportlab==3.5.57
xhtml2pdf==0.2.5
tqdm==4.64.0
gunicorn==20.1.0

Step 4: Create a Python file named manage.py and add the following code:
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys

def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE',
'capstone.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)

if name__ == ' main ':


main()

Step 5: Build and run the Docker container using the docker compose up command:
$ docker-compose up

Step 6: Access the Django application in your web browser at http://localhost:8000.

Step 7: To stop the application, use the docker-compose down command:


$ docker-compose down
OUTPUT :

Flight Management System – Ui


RESULT:
Thus the Flight Management System – Python Django Web Application
has been successfully dockerized.

You might also like