/102023_Web_Project_fakefilms

Web project developed for the subject "102023 - Web Project" studied in the degree of Computer Engineering at the University of Lleida

Primary LanguageJavaScript

Web Project

Summary

Introduction

Web Project is a subject of the Degree Computer Engineering studied in University of Lleida. This is the repository of the project of this subject.

Project idea

The idea of our project is a web application that allows its registered users to access an online library that contains movies and series (similar to Netflix). The main difference that will exist between our idea and Netflix (or similar online apps that already exist) is that the platform which are we are going to be developing this project in will be completely free.

The main goal we are trying to achieve with this project will is to understand how a movie streaming service works through with a web application.

Requirements

The document named requirements.txt should include the following dependencies:

  Django==3.1.7 
  gunicorn==20.1.0 
  django-heroku 
  whitenoise

How to run the application with docker

To run the application as a docker container orchestration we need to have the Dockerfile with the following content

FROM python:latest
ENV PYTHONUNBUFFERED=1
RUN mkdir /app
WORKDIR /app
COPY requirements.txt /app/
RUN pip install -r requirements.txt
COPY . /app

We also need the file docker-compose.yml with the following content

version: "3.9"

services:
  web:
    build: .  
    container_name: fakefilms
    command: python manage.py runserver 0.0.0.0:8000
    volumes:
      - .:/app
    ports:
      - "8000:8000"

Finally, to run the application you have to execute the following commands:

docker-compose up

How to deploy the application in heroku

To deploy the project in heroku you need to follow the following instructions:

1- Copy all the document files in a new folder.

2- We make sure that Procfile file exist.

  web: gunicorn fakefilms.wsgi

3- We make sure that requeriments.txt exist with all the following dependencies:

  Django==3.1.7 
  gunicorn==20.1.0 
  django-heroku 
  whitenoise

4- Create a new repository:

  git init
  git add .
  git commit -m "heroku deployment"

5- Login in heroku:

  heroku login

6- Create new application in heroku:

  heroku create fakefilm

6.1- In case that the application is already created:

  heroku git:remote -a fakefilms

7- Push the new repository to the new heroku application:

  git push heroku master

8- Configure the django environment variables:

  heroku config:set DJANGO_SETTINGS_MODULE=fakefilms.settings_heroku

9- Migrate the DB:

  heroku run python manage.py migrate

10- Create superuser:

  heroku run python manage.py createsuperuser 

Teachers

The teachers who have guided this project are:

Authors

This project have been developed by: