1
0
mirror of git://f0xx.org/android_cast synced 2026-07-29 05:17:39 +03:00
Files
android_cast/docs/BUILD_DEPLOY.md
Anton Afanasyeu 7b1311c78e wg start
2026-06-04 17:27:19 +02:00

2.9 KiB

Android Cast build ecosystem



Table of contents

Documentation index: README.md


Shared authentication

All web consoles (Crashes, Tickets, Builder) share:

Setting Value
Session name ac_crash_sess
Cookie path /app/androidcast_project
User store MariaDB users table (same DB as crashes)
PHP auth examples/crash_reporter/backend/src/Auth.php

Sign in once on any console; the session cookie is valid for /crashes/, /build/, and future apps under the same path prefix.

Orchestration generates matching configs:

  • orchestration/runtime/crash-config.php
  • orchestration/runtime/build-config.php

Both use ${MARIADB_USER} / ${MARIADB_PASSWORD} from orchestration/.env.

Local stack

cd orchestration
./deploy.sh
URL Purpose
http://localhost:8080/app/androidcast_project/ Hub landing
…/crashes/ Crash / ticket console
…/build/ APK builder console
…/v0/ota/ Published OTA artifacts (when auto-deploy enabled)

Direct debug ports: crashes :8082, builder :8083.

Trigger a build

  1. Open Builder → sign in (default dev user from crash schema seed).
  2. Set git ref, pipeline options, OTA channel.
  3. Start build → detail page polls log every 1s.
  4. Artifacts land in out/builds/<id>/; optional OTA copy to orchestration/runtime/ota-artifacts/.

Docker CI

  • Image version label: 00.BB.CC.DDDD (see root Dockerfile).
  • Host wrapper: scripts/docker-build-runner.sh
  • In-container pipeline: scripts/ci-build-and-publish-ota.sh
  • OTA generator: scripts/generate-ota-v0.sh [channel]

CircleCI

  • Pipeline description: build.config.yml
  • Local CLI stub: .circleci/config.yml (circleci config validate)

Production notes

  • Mount builder PHP with Docker socket (build host only).
  • FE nginx: read-only OTA under /v0/ota/; BE RWX on artifact mount.
  • Keep session_cookie_path identical across all PHP apps behind the hub.

Alpine BE (config.php paths)

Key Example on artc0
build.repo_root /var/www/.../androidcast_project/android_cast (git tree)
build.artifacts_root /var/www/.../androidcast_project/out/buildsmust exist, writable by PHP-FPM (nginx)
build.runner_script full path to scripts/docker-build-runner.sh (no ... placeholders)
mkdir -p .../out/builds .../ota-artifacts
chown -R nginx:nginx .../out
chmod -R 775 .../out

If Start build shows Network error, check BE php-fpm81 log: often mkdir(): Permission denied on out/builds (HTTP 500, not a browser network fault).