- Introduction
- Project idea
- Requirements
- How to run the application
- How to deploy the application in heroku
- Teachers
- Authors
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.
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.
The document named requirements.txt should include the following dependencies:
Django==3.1.7
gunicorn==20.1.0
django-heroku
whitenoise
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
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
The teachers who have guided this project are:
This project have been developed by: