- Built with PHP 8.4 and Openresty.
- Uses Laravel and ReactPHP to connect to IRC networks and collect information about shared files.
- With Intertia and Vue 3 to create a simple User Interface to download and interact with media.
- Recommended for Linux servers (Not supported on Windows).
- Pre Alpha (Not for distribution)
Currently the only way to download the project is with git:
git clone https://github.com/jesse-greathouse/mcol.git
cd mcol
bin/install
# wait...
bin/configure
# Answer questions to configure for the environment...
bin/mcol start
# Starts the Mcol Daemons
# UI running at:
# http://localhost:8080
bin/install
-
The install Script will ask you to gain evelated privelages to install the program.
-
The application uses a specialized PHP and Nginx build and configuration that's suitable for running the program.
-
It's strongly recommended to use redis. Defaulting to filesystem cache will hurt performance.
-
Install adds the system libraries that the downstream PHP executable will need to have in its build.
-
Install bulds the Nginx, PHP, PHP Extensions, Installs composer and builds composer dependencies.
-
The PHP Extensions are: msgpack-php, php-rar, phpredis
-
Install also depends on NVM to add the correct Node and NPM dependencies in building the front end application.
-
Once the installation of all dependencies is completed, the program itself will never run at elevated privelages.
bin/configure
- The Nginx, PHP, and other system configurations in etc/ will be dymically created by the bin/configure script.
- If you need to backup everything before running bin/configure... you should and,.. good luck!
- I would like to see an easier way of handling config restores but currently not invested in it.
- Plan on running bin/configure the first time and from then on out, just edit the configuration.
- Database Migrations
- At the end of configure, the script will prompt you to migrate databases.
- Database migrations update the database schema to the latest schema design.
- Running migrations is necessary if the application is newly installed.
The created configuration file: .mcol-cfg.yml
can be found in the root directory of the project.
The creation of this config .yml is to populate the configuration strings of all the subsystems.
To start Mcol for the first time, run from the command line like this:
bin/mcol start
This starts Mcol's 3 subsystems:
- web
- queue
- Instances
These services will be run by supervisor.
The output will be in the following logs:
- var/log/supervisord.log
- var/log/error.log
You can actively monitor Mcol's output...
for errors:
tail -f var/log/error.log
for all other logging:
tail -f var/log/supervisord.log
You can stop all of mcol's subsystems like this:
bin/mcol stop
You can also restart all of mcol's subsystems like this:
bin/mcol restart
If you want to stop the mcol supervisr daemons, use the kill
action.
(After a daemon has been killed, the only action useable on it is Start, to restart the supervisor daemons.)
bin/mcol kill
If you prefer to stop, start or restart a subystem individually, you can do that too!
bin/instance [start|stop|restart|kill]
bin/queue [start|stop|restart|kill]
bin/web [start|stop|restart|kill]
bin/migrate
Migrates the database to the newest schema design. This may be necessary after the application has recieved an update. If it's not needed, no migrations will be run.
bin/download packetId
Queues the system to download a packet by the packet's id field in the packets table.
bin/hot-report network channel
Given the inputs of a network and a channel, this command will print a report to the terminal about which media is hot with users in the channel.
ex:
myuser@mycomputer:~/mcol$ bin/hot-report "Abjects" "#mg-chat"
Looking for the hottest search terms on: #mg-chat@Abjects ...
What's hot in #moviegods: - 978 Releases with a total of 254.4 downloads per hour
+------+--------+------------------------------------------+
| rank | rating | term |
+------+--------+------------------------------------------+
| 1 | 7.8 | Yellowjackets.S03E05 |
| 2 | 5.7 | Captain.America.Brave.New.World.2025.21 |
| 3 | 4.8 | Reacher.S03E05 |
| 4 | 4.5 | Matlock.2024.S01E14 |
| 5 | 3.4 | Severance.S02E08.Sweet.Vitriol.2160p.AT |
| 6 | 3 | 9-1-1.S08E09 |
| 7 | 2.5 | georgie.and.mandys.first.marriage.s01e13 |
| 8 | 2.5 | daredevil.born.again.s01e01 |
| 9 | 2.3 | Greys.Anatomy.S21E09 |
| 10 | 2.2 | Reacher.S03E05.Smackdown |
| 11 | 2.1 | Elsbeth.S02E14 |
| 12 | 2 | The.Pitt.S01E10.400.P.M |
| 13 | 1.5 | Captain.America.Brave.New.World.2025 |
| 14 | 1.4 | severance.s02e08 |
+------+--------+------------------------------------------+
... done!
bin/packet-search network channel "search string"
Given the inputs of a network and a channel and search string, this command will print a of which bots are offering files related to the search string.
ex:
myuser@mycomputer:~/mcol$ bin/packet-search "Abjects" "#mg-chat" "Breaking.Bad"
Searching for: Breaking.Bad ...
Found 10 results in #moviegods
+-------+------+-------------------------------------------------------------------------------------+
| id | size | file |
+-------+------+-------------------------------------------------------------------------------------+
| 4692 | 24G | Breaking.Bad.S01.1080p.BluRay.DTS5.1.x264-iNGOT.tar |
| 45201 | 13G | Breaking.Bad.S01.German.DL.AC3.1080p.BluRay.x265-FuN.tar |
| 4720 | 23G | Breaking.Bad.S02.1080p.WEB-DL.DD5.1.H264-BTN.tar |
| 45205 | 28G | Breaking.Bad.S02.German.DL.AC3.1080p.BluRay.x265-FuN.tar |
| 4738 | 23G | Breaking.Bad.S03.1080p.WEB-DL.DD5.1.H264-BTN.tar |
| 45208 | 13G | Breaking.Bad.S03.German.DL.AC3.1080p.BluRay.x265-FuN.tar |
| 45210 | 10G | Breaking.Bad.S04.German.DL.AC3.1080p.BluRay.x265-FuN.tar |
| 4785 | 30G | Breaking.Bad.S05.1080p.WEB-DL.DD5.1.H264-BTN.tar |
| 45212 | 13G | Breaking.Bad.S05.German.DL.AC3.1080p.BluRay.x265-FuN.tar |
| 46161 | 6.2G | El.Camino.A.Breaking.Bad.Movie.2019.German.AC3.AAC.5.1.DL.1080p.BluRay.x264-oWn.mkv |
+-------+------+-------------------------------------------------------------------------------------+
Search completed successfully.
myuser@mycomputer:~/mcol$ bin/download 4692
Requested packet: 4692 -- Breaking.Bad.S01.1080p.BluRay.DTS5.1.x264-iNGOT.tar
-
The "name" of the app.
Vite needs an application name, usually just mirrors APP_NAME
Puts the app in debug mode.
The "name" of the environment.
Auto generated base64 encoded string. Do not alter.
Should be the same as the host server.
The web address that will have the user interface.
System "cache" directory.
Laravel value for cache driver.
Only MySQL is supported presently. Theoretically it could be using an alternate database using the underlying Laravel database connection, however I never intended to support different database platforms and so there is a large chunk of raw SQL submitted in the `App\Packet\Browse` class that would need to be adapted. It's recommended just to use MySQL because that's the only way I can guarantee the best performance.
The schema name.
The Database Host Address.
The Database User.
The Database Password.
The Database Port.
The domain that is hosting the web application. Variable to strictly limit sessions to that domain.
For supporting authentication, should simply mirror SESSION_DOMAINS.
Session driver.
Home directory of the running user.
The "var" directory. Handles logs and files that get bigger.
The directory whehere the web root is served from.
The Configuration directory.
The Source Code directory.
Directory where downloads will be held.
The logging variables.
Redis configurations
The Application does not currently send signals to supervisor. Theoretically it might be added.
-
These are supervisor daemon configurations. They can be used to send signals to the supervisor daemons.
-
The application user's home directory.
The value for the domains directive in nginx.
The system username.
The Cxnfiguration directory.
The "var" directory. Handles logs and files that get bigger.
The directory where source code resides.
The directory of the web files.
The error log.
The port that the web UI will be served at.
The secret that authenticates the session. This is dynamically generated when you run the
Flags using SSL in the webserver configuration.
The SSL configuration (auto-generated.)
The "force" SSL Line (auto-generated.)
The line to include the SSL cert.
The line to unclude the SSL key.
-
Used to specify a specific DB in Redis.
The redis host (Can be a unix socket file).
The redis password.
The redis port.