Skip to content

francoism90/hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hub

Introduction

Hub is a video on demand (VOD) media distribution system that allows users to access to videos, television shows and films.

NOTE: This is a personal project, please do not expect a production ready product. It is mainly intended for learning and testing the latest Laravel features. You can fork the project and make your own adjustments based on my changes.

Demo

A basic demo is available at https://hub.foxws.nl/.

Use the following login credentials:

Please note it's a low-tier VPS, expect slowness. :)

Stack

Hub uses a subset of the following:

Prerequisites

  • Linux (Fedora, Debian, Ubuntu, CentOS, Arch ..) - WSL is untested
  • Podman 5.1 or higher (with SELinux support)

Installation

Clone repository

Clone the repository, for example to /home/<user>/Code/hub:

cd ~/Code
git https://github.com/francoism90/hub.git

Configure Hub:

cd ~/Code/hub
cp .env.example .env
vi .env

To access Hub on your local machine, add the following /etc/hosts entries:

127.0.0.1 hub.lan ws.hub.lan
::1 hub.lan ws.hub.lan

You may want to use your own DNS-server (like AdGuard Home), to expose Hub on your LAN.

It is also possible to run Hub on a VPS, but please make sure the following best practices and protect it against unwanted access/usage. The given configuration examples assume you want to run Hub locally/selfhosted.

Podman Quadlet

Please read the dedicated guide for usage with Podman Quadlet.

Usage

Start Hub:

systemctl --user start hub-app hub

On first run, enter the systemd-hub-app container, and execute the followings commands:

$ hub shell
composer install
php artisan key:generate
php artisan storage:link
yarn install && yarn run build
php artisan app:install
php artisan users:create

The Hub instance should be available at https://hub.lan when using the given examples.

The following Laravel services are available, and can be accessed when logged-in as super-admin:

Manage application

NOTE: Run hub a and hub help for all available commands.

To import videos:

cp -r /path/to/import/from/* ~/Code/hub/storage/app/import/
chcon -Rt container_file_t ~/Code/hub/storage/app/import/*
hub a videos:import

To create a tag:

hub a tags:create

To force removing of soft-deleted videos:

WARNING: Only run command when you don't want to restore all deleted videos!

hub a videos:clean

Updating

NOTE: See guide on managing containers.

To retrieve the latest changes:

cd ~/Code/hub
git pull

It is recommended to rebuild the Docker containers at least weekly:

cd ~/Code/hub/podman
./update
systemctl --user restart hub-app hub

To update the application:

$ hub shell
composer install
yarn install && yarn run build
php artisan app:update