Another Private Torrent framework Project. On Heavily Development now !!!
Demo Url: https://ridpt.top/
Test Account Information:
- Username :
Admin
- Password :
123456
-
We test our RidPT project on this environment :
- Nginx 1.14.2
- MySQL 8.0.17 (At least)
- PHP 7.4.1 (With other extension which your can see in
composer.json
) - Swoole 4.2.12
- Redis 5.0.3 Stable
- Bower 1.8.4 (A package manager for the web)
- Suggest
-
After you prepare those base environment well
- run below command to clone this repo or you can download from our release.
git clone https://github.com/Rhilip/RidPT.git /home/wwwroot/your.domain.com cd /home/wwwroot/your.domain.com/
- Use
composer install
to install PHP dependency. - Use
bower install
to install our front-end dependency (like js,css,font) - If you don't run RidPT apps in
root
user, you should give enough permission toapps/{storage,var}
.
- run below command to clone this repo or you can download from our release.
-
Import Database Structure from our
migration/ridpt.sql
, and disable Mysql strict modeNO_ZERO_IN_DATE
andNO_ZERO_DATE
.mysql -u root -p < migration/ridpt.sql
-
Then set your RidPT Project config (about APP, DATABASE, Redis, Mailer) in
.env
(Or better.env.local
). The other config about site your can edit in Admin Panel.cp .env.example .env vi .env
-
Run Test by
php bin/console server start -u
, And Congratulation If you see those output without error throwout.root@Ubuntu-iso-DND:/data/wwwroot/ridpt.top# php bin/console server:start ____ __ ____ ______ /\ _`\ __ /\ \/\ _`\ /\__ _\ \ \ \L\ \/\_\ \_\ \ \ \L\ \/_/\ \/ \ \ , /\/\ \ /'_` \ \ ,__/ \ \ \ \ \ \\ \\ \ \/\ \L\ \ \ \/ \ \ \ \ \_\ \_\ \_\ \___,_\ \_\ \ \_\ \/_/\/ /\/_/\/__,_ /\/_/ \/_/ ------------------------ ------------------------------------------------ Environment Value ------------------------ ------------------------------------------------ System Name Linux Framework Version v0.1.7-alpha PHP Version 7.4.1 Swoole Version 4.4.14 Listen Addr 127.0.0.1 Listen Port 9501 Reactor Num 1 Worker Num 5 Hot Update disabled Coroutine Mode disabled Config File /data/wwwroot/ridpt.top/config/application.php ------------------------ ------------------------------------------------
-
Then you can safely add Nginx reserve proxy config like
migration/nginx.conf
. And Notice : If your service is behind the CDN like Cloudflare, You MUST follow How do I restore original visitor IP with Nginx? So that tracker can correctly record the peer's ip address. -
Use the default
php bin/console server:start -d
to let RidPT RUN in the background. Or you can use other daemon work like:- Systemctl: ridpt.service
Notice: Any change in file
.env
require the restart of Application to Make it effective
Document: None
Key | Type | Note |
---|---|---|
ENUM('local','staging') | Not use now. | |
APP_DEBUG | Bool | Turn on or off the debug model,Turn if off after success deploy ! |
APP_SECRET_KEY | String | The key used to encrypt and decrypt some data.(Change it before deploy and don't Change it after Deploy) |
APP_SECRET_IV | String | A non-NULL Initialization Vector.(Change it before deploy and don't Change it after Deploy) |
Document: PHP: PDO::__construct - Manual
Key | Type | Note |
---|---|---|
DATABASE_DSN | DSN | The Data Source Name, or DSN, contains the information required to connect to the database. |
DATABASE_USERNAME | String | The user name for the DSN string. |
DATABASE_PASSWORD | String | The password for the DSN string. |
Document: phpredis/phpredis
Key | Type | Note |
---|---|---|
REDIS_HOST | String | A host, or the path to a unix domain socket. |
REDIS_PORT | Int | Dy default 6379. |
REDIS_DATABASE | Int | dbindex, the database number to switch to. |
REDIS_PASSWORD | String | The password for the Redis server. |
Document: the PHPMailer wiki
Key | Type | Note |
---|---|---|
MAILER_DEBUG | Int | SMTP class debug output mode. |
MAILER_HOST | String | SMTP hosts. |
MAILER_PORT | Int | The default SMTP server port. |
MAILER_ENCRYPTION | Enum('','tls','ssl') | What kind of encryption to use on the SMTP connection. |
MAILER_USERNAME | String | SMTP username. |
MAILER_PASSWORD | String | SMTP password. |
MAILER_FROM | String | The from address of this email. |
MAILER_FROMNAME | String | The from name of this email. |
Notice: Most Dynamic config note you can found in our config setting Page
// TODO
Some rule or Docs May help you when you rebuild this project, Or you can join our chat group on Telegram -- @ridpt
Library | Docs |
---|---|
Zui: an HTML5 front UI framework | http://zui.sexy/ ( Chinese Version ) |
FortAwesome: The iconic SVG, font, and CSS toolkit | https://fontawesome.com/icons?d=gallery |
flag-css: CSS for SVG country flags respecting the original ratio. | https://kfpun.com/flag-css/ |
zxcvbn: Low-Budget Password Strength Estimation | https://lowe.github.io/tryzxcvbn/ |
bootstrap-validator: A user-friendly HTML5 form validation jQuery plugin for Bootstrap 3 | http://1000hz.github.io/bootstrap-validator |
jQuery.Textarea.Autoresize: Smart resizing for textareas using jQuery | https://github.com/AndrewDryga/jQuery.Textarea.Autoresize |
Library | Used As | Docs |
---|---|---|
MixPHP v1 | Framework | https://www.kancloud.cn/onanying/mixphp1/379324 ( Chinese Version ) |
vlucas/phpdotenv | phpdotenv | https://github.com/vlucas/phpdotenv |
adhocore/cli | Console Application | https://github.com/adhocore/php-cli |
siriusphp/validation | Validator | http://www.sirius.ro/php/sirius/validation/ |
league/plates | Template system | http://platesphp.com/ |
firebase/php-jwt | JWT | https://github.com/firebase/php-jwt, https://jwt.io/ |
MeiHeZi For Demo Site Host Server