Sign inSign up

thenerdful8/lecture2gether

By thenerdful8

•Updated almost 6 years ago

A tool for synchronized online lecture streaming https://lecture2gether.eu

Image
1

7.8K

thenerdful8/lecture2gether repository overview


Logo

⁠Lecture2Gether

Watch online lectures together!

View Demo⁠ · Report Bug⁠ · Request Feature⁠ · Send a Pull Request⁠

⁠About The Project

Lecture2Gether makes it possible to watch online lectures with friends by pasting a link to a Lecture2Go⁠ Video, a YouTube Video or a simple mp4 link. The video streams are synchronized to partially restore the social aspect of campus life.

Flask CI    Node.js CI    Kubernetes configuration

⁠Built With

⁠Install

⁠Using docker (or podman)

You can either build the image from source or use one of the provided versions from our Docker Hub Repository⁠.

# for building from source
docker build -t lecture2gether
docker run -p 8000:8000 lecture2gether

# for running from docker hub
docker run -p 8000:8000 thenerdful8/lecture2gether

This will start the whole application stack and expose it at http://localhost:8000/⁠.

⁠Install single Backend

The backend runs on a redis database. Run the redis docker docker run -it -p 6379:6379 redis:buster or install manually by following this guide⁠. Set the environment-variables 'REDIS_HOST', 'REDIS_PORT', 'REDIS_DB', 'REDIS_PASSWORD' accordingly.

#Clone the repository
git clone https://github.com/TheNerdful8/Lecture2Gether

#Go to the backend folder
cd Lecture2Gether/lecture2gether_flask/

#Get Poetry
pip3 install poetry --user

#install the dependencies
poetry install --no-root

#start the server manually
poetry run python app.py
⁠Install single Frontend

Install npm⁠ on your machine

#Clone the repository
git clone https://github.com/TheNerdful8/Lecture2Gether

#Go to the frontend folder
cd Lecture2Gether/lecture2gether-vue/

#Install required npm dependencies
npm install

#Run the application with
npm run serve

⁠Configuration

There are two main ways of configuring the application: Frontend and backend. While the defaults were chosen in such a way that they work in a development environment (the docker container has different ones⁠) they might need change in a production setup.

The server can be configured via the following environment variables

NameDefault ValueDescription
SECRET_KEYcodenamesChange this in production
REDIS_HOSTlocalhostHostname of the redis database which should be used
REDIS_PORT6379Port on which redis listens on the redis-host
REDIS_DB0Which database on the redis server should be used
REDIS_PASSWORDemptyPassword to authenticate at the redis server
CLEANUP_INTERVAL900Interval (in seconds) of searching for abandoned rooms
CLEANUP_ROOM_EXPIRE_TIME3600Time (in seconds) until an empty room gets abandoned
CLEANUP_MAX_ROOM_LIFE_TIME86400Time (in seconds) until an active room gets abandoned
LOGLEVELINFOConfigures the python logging loglevel
GOOGLE_YOUTUBE_API_KEYemptyGoogle YouTube Data v3 API-key, used to extract meta data from YouTube videos
GOOGLE_DRIVE_API_KEY_BACKENDemptyGoogle Drive API key, used to access meta data in the backend
GOOGLE_DRIVE_API_KEY_FRONTENDemptyGoogle Drive API key, used to access Google Drive files in the frontend (see warning [1])
SENTRY_DSNemptySentry connection DSN⁠
SENTRY_ENVdefaultSentry environment⁠

[1] This key is publicly readable, restrict its usage to the used website (e.g. https://lecture2gether.eu⁠ or equivalent IP address) and Google Drive in the Google API console.

The frontend is configured via a settings.json file which should be reachable on a request to /settings.json from the running browser application. The format is as follows:

{
    "apiRoot": <string>,        // Under which url the server is reachable for http api calls
    "socketioHost": <string>,   // Under which host the socket.io endpoint is served.
                                // Can be an empty string which results in the same as where the frontend is deployed
    "environment": <string>,    // Determines the sentry [environment](https://docs.sentry.io/error-reporting/configuration/?platform=browser#environment)
    "sentry_dsn": <string>      // Sentry connection [DSN](https://docs.sentry.io/error-reporting/configuration/?platform=browser#dsn)
                                // Can be an empty string which disables sentry reporting
}

⁠Statistics

The backend publishes statistical data (No. sessions, No. joined/left rooms, server infos, ...) in the Prometheus⁠ format to /metrics. This can be scraped by a Prometheus⁠ server and displayed in e.g. Grafana⁠.

⁠License

Distributed under the MIT License. See LICENSE for more information.

Tag summary

Content type

Image

Digest

Size

301.6 MB

Last updated

almost 6 years ago

docker pull thenerdful8/lecture2gether