- PHP 75.1%
- Go Template 24.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
deploy / deploy (push) Successful in 58s
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
| .forgejo/workflows | ||
| css | ||
| fonts | ||
| install | ||
| js | ||
| template | ||
| .editorconfig | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| .htaccess | ||
| bootstrap.php | ||
| composer.json | ||
| composer.lock | ||
| cron.php | ||
| dl.php | ||
| favicon.ico | ||
| functions.php | ||
| index.php | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
| robots.txt | ||
| Updater.php | ||
TorrentPier Download Center
Download center for TorrentPier builds: https://get.torrentpier.dev
A cron job reads releases and tags of torrentpier/torrentpier
and torrentpier/torrentpier-lts, downloads the builds
into secret/ and lists them in MySQL. A build is listed only after it passes verification:
- the final HTTP status is 200 and the body length matches
Content-Length; - sha256 and size match the release asset digest, when GitHub provides one;
- the file is a valid ZIP archive.
The checksum shown on the site is the sha256 of the stored file. A file already on disk is re-checked the same way and downloaded again if it fails.
Fetching builds (console only)
php cron.php # latest build of the main repository
php cron.php version=v2.4.1 # a specific build
php cron.php version=all # every build
php cron.php type=lts # latest LTS build
php cron.php type=lts version=all # every LTS build
Progress and errors go to logs/cron.log. cron.php refuses to run over HTTP.
Setup
composer installcp .env.example .envand fill in the database settings. UseAPP_ENV=production: withlocalthe cached GitHub responses injson/are never refreshed.GITHUB_TOKENis optional and only raises the GitHub API rate limit.- Import
install/mysql.sql. - Schedule
php cron.phpandphp cron.php type=lts(for example once a day).
Deploy
A push to main runs .forgejo/workflows/deploy.yml: lint, composer install --no-dev, then the
code is shipped over SSH to the server, where it is checked with the site's PHP and copied over the
previous version (with a backup). .env, secret/, json/, logs/ and caches on the server are
never touched by a deploy. Needs the DEPLOY_SSH_KEY secret and the DEPLOY_TARGET and
DEPLOY_KNOWN_HOSTS variables in Forgejo.
Keep .env, json/, logs/, vendor/, cache/, compiled/, install/, template/ and the PHP
helpers (cron.php, Updater.php, bootstrap.php, functions.php) out of public reach.
.htaccess alone does not protect them when nginx serves static files itself.