2.8 KiB
Deployment Files
The hosting deployment is built by scripts/build-deploy-artifact.sh into build/deploy/.
Included:
app/bootstrap/public/routes/vendor/composer.jsoncomposer.locksparkpreload.phpwritable/.htaccesswritable/index.htmlwritable/.gitkeepwritable/*/.gitkeepwritable/tcpdf_fonts/
Excluded:
.git/.gitea/.envand local env backupstests/Database_Dump/build/except the generated deploy artifact during CI- documentation/planning files
- local scripts that are not needed at runtime
- runtime cache, logs, sessions, uploads, and generated reports
The server keeps its own .env and runtime writable/ contents. The deploy job never overwrites those.
Shared hosting layout
.gitea/workflows/deploy.yml deploys to Hostinger-style shared hosting, where the document root is public_html and the CodeIgniter application lives in a sibling directory:
/home/USER/domains/home.alrahmaisgl.org/alrahma application (not web-accessible)
/home/USER/domains/home.alrahmaisgl.org/public_html document root (contents of public/)
public_html/index.php is patched to load:
require FCPATH . '../alrahma/app/Config/Paths.php';
Existing public_html/uploads, cgi-bin, and .well-known are left in place.
Gitea repository secrets
Required for SSH deploy:
DEPLOY_HOST- SSH hostname from the Hostinger panelDEPLOY_USER- SSH username (for exampleu280815660)DEPLOY_SSH_KEY- private key whose public half is in Hostinger SSH AccessDEPLOY_APP_PATH- application directory, for example/home/u280815660/domains/home.alrahmaisgl.org/alrahma
Optional:
DEPLOY_PUBLIC_PATH- document root. Defaults to a siblingpublic_htmlnext toDEPLOY_APP_PATH, for example/home/u280815660/domains/home.alrahmaisgl.org/public_htmlDEPLOY_PORT- defaults to65002(Hostinger SSH). Use22only if the host uses the standard port.DEPLOY_PHP_BIN- defaults to/opt/alt/php85/usr/bin/phpDEPLOY_INDEX_REQUIRE- defaults to../alrahma/app/Config/Paths.phpDEPLOY_PATH- fallback forDEPLOY_APP_PATHif the newer secret is not set
Create .env once on the server under DEPLOY_APP_PATH. Do not put database or mail passwords in the workflow.
Gitea Package
The deploy workflow also archives build/deploy/ and publishes it to Gitea Packages when package credentials are present:
- Package name:
alrahma_sunday_school - Version format:
{branch}-{run_number}-{short_sha} - File format:
alrahma_sunday_school-{version}.tar.gz
Optional package secrets:
GITEAPACKAGEUSERGITEAPACKAGETOKENGITEA_BASE_URL- defaults tohttps://192.168.3.80GITEA_PACKAGE_OWNER- defaults tomelabidi
The token must have permission to publish packages for the package owner.