Skip to content

TobiasReize/videoflix_backend

Repository files navigation

Videoflix Backend

A Django-based backend project for a video streaming platform.

Videoflix uses Django and Django Restframework (DRF) to provide individual endpoints, authentication and permissions. PostgreSQL as database and Redis for Caching-Layer. FFmpeg including Django-RQ is used to convert the videos.

This project is part of the videoflix_frontend.

Prerequisites:

Python version >= 3.10

How to install this repository on a Linux server or WSL:

  1. Clone this repository:
    git clone <GitHub repository link>
  1. Create a virtual environment (in the project folder):
    python3 -m venv env_lin
  1. Install the dependencies:
    activate the virtual environment: source env_lin/bin/activate
    pip install -r requirements.txt
  1. Install packages:
    sudo apt-get install ffmpeg
    sudo apt install redis-server
    sudo apt install postgresql postgresql-contrib

(--> edit password in redis.conf)
(--> set up postgres database)

  1. Set the environment variables:
    rename the .env-template file to .env and fill out the environment variables
  1. Run background processes:
    sudo service redis-server start
    sudo service postgresql start
    python manage.py rqworker
  1. Apply migrations:
    python manage.py makemigrations
    python manage.py migrate
  1. Create a Superuser/ Admin: (only superuser can add videos)
    python manage.py createsuperuser
  1. Create static files:
    python manage.py collectstatic
  1. Run the local development server (on path: 127.0.0.1:8000):
    python manage.py runserver
  1. Start videoflix_frontend:
    clone the repository and run the liveserver on path 127.0.0.1:4200

About

Video streaming platform (demo project)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published