A tool for synchronized online lecture streaming https://lecture2gether.eu
7.8K
Watch online lectures together!
View Demo
·
Report Bug
·
Request Feature
·
Send a Pull Request
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.
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/.
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 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
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
| Name | Default Value | Description |
|---|---|---|
| SECRET_KEY | codenames | Change this in production |
| REDIS_HOST | localhost | Hostname of the redis database which should be used |
| REDIS_PORT | 6379 | Port on which redis listens on the redis-host |
| REDIS_DB | 0 | Which database on the redis server should be used |
| REDIS_PASSWORD | empty | Password to authenticate at the redis server |
| CLEANUP_INTERVAL | 900 | Interval (in seconds) of searching for abandoned rooms |
| CLEANUP_ROOM_EXPIRE_TIME | 3600 | Time (in seconds) until an empty room gets abandoned |
| CLEANUP_MAX_ROOM_LIFE_TIME | 86400 | Time (in seconds) until an active room gets abandoned |
| LOGLEVEL | INFO | Configures the python logging loglevel |
| GOOGLE_YOUTUBE_API_KEY | empty | Google YouTube Data v3 API-key, used to extract meta data from YouTube videos |
| GOOGLE_DRIVE_API_KEY_BACKEND | empty | Google Drive API key, used to access meta data in the backend |
| GOOGLE_DRIVE_API_KEY_FRONTEND | empty | Google Drive API key, used to access Google Drive files in the frontend (see warning [1]) |
| SENTRY_DSN | empty | Sentry connection DSN |
| SENTRY_ENV | default | Sentry 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
}
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.
Distributed under the MIT License. See LICENSE for more information.
Content type
Image
Digest
Size
301.6 MB
Last updated
almost 6 years ago
docker pull thenerdful8/lecture2gether