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.
A basic demo is available at https://hub.foxws.nl/.
Use the following login credentials:
- Email:
[email protected]
- Password:
password
Please note it's a low-tier VPS, expect slowness. :)
Hub uses a subset of the following:
- Linux (Fedora, Debian, Ubuntu, CentOS, Arch ..) - WSL is untested
- Podman 5.1 or higher (with SELinux support)
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.
Please read the dedicated guide for usage with Podman Quadlet.
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:
- https://hub.lan/horizon - Laravel Horizon
- https://hub.lan/pulse - Laravel Pulse
- https://hub.lan/telescope - Laravel Telescope (disabled by default)
NOTE: Run
hub a
andhub 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
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