- Docs
- Operations
- Environments and secrets
Environments and secrets¶
This page defines how TyteRide handles environment separation, secret storage, rotation, and repository remotes. Keep secrets out of git; do not duplicate the API deployment runbook (api/docs/operations/deployment.md).
1. Environment separation¶
- Beta host: single host runs CyberPanel + OpenLiteSpeed (
lshttpd), API on PHP 8.3 via lsphp/lsapi, Reverb, MariaDB 10.6.22, and Redis. Vhosts:/usr/local/lsws/conf/vhosts/{domain}/vhost.conf. - Services present: only
tyteride-reverb.serviceruns for TyteRide. No TyteRide queue worker or scheduler systemd unit/cron runs on this host; do not claim they run. - Surface environments: each surface has its own runtime/build configuration. Do not hardcode environment-specific URLs, keys, or secrets into source.
- Mobile app development: Passenger App and Driver App are developed on the owner's machine; this host keeps only gitlinks.
- Local/dev vs host: use
.env.exampleplaceholders only; actual values are environment-specific and never committed.
2. .env and secret handling¶
- Secrets live in host environment variables or
.envfiles that are never committed. Use.env.examplewith placeholders only. - Do not copy old Trippp
.envfiles into TyteRide. Do not commit secrets,.envfiles, APKs, or build output. - Before deploying API changes, confirm required runtime values exist on host; keep values out of docs and git.
Current host-relevant API keys (names only; values are secret): APP_*, DB_CONNECTION=mariadb/DB_HOST/DB_PORT/DB_DATABASE=tyteride/DB_USERNAME/DB_PASSWORD, REDIS_HOST=127.0.0.1/REDIS_PORT=6379, CACHE_STORE=redis/QUEUE_CONNECTION=redis, REVERB_* (REVERB_HOST=127.0.0.1, REVERB_PORT=8080, public scheme/host/port/path for api.tyteride.drolez-apps.cloud:443), SMS_DRIVER, SMS_LOG_OTP_IN_PRODUCTION.
SMS warning:
SMS_DRIVER=logandSMS_LOG_OTP_IN_PRODUCTION=trueare currently set for testing. Plaintext OTP logging is temporary and must be disabled after testing.
3. Key rotation¶
Rotate credentials before reuse when their exposure is uncertain, and rotate immediately after any suspected leak.
| Case | Action |
|---|---|
| Old Trippp credentials | Rotate any credential that appeared in old Trippp docs before reuse. Do not copy old .env files. |
| Old Google Maps key | Replace with a new restricted key before reuse; update env and validate Maps/Directions API access (verify on host). |
| Host/service credentials | Rotate MariaDB, Redis, Reverb/broadcast, third-party API, and SMS/OTP provider credentials through the owning provider/host. Record rotation in the team operational log (verify on host). |
| GitHub/deploy credentials | Prefer gh credential helper or deploy keys/SSH aliases as appropriate. Revoke old credentials after replacement. |
4. Remotes and credential helpers¶
.gitmodulesuses HTTPS URLs plus theghcredential helper (gh auth setup-git). This avoids SSH alias configuration for normal host bootstrap.- If a multi-account or deploy-key setup is required, switch URLs to SSH aliases, for example:
git@github.com-tyteride:owner/repo.git
- Document SSH aliases in
~/.ssh/config. Do not mix protocols across submodules. - The old Trippp alias scheme (
github.com-parent/github.com-submodule1..3) is not carried over.
5. Operational checks¶
- Confirm
.envfiles and secrets are excluded from git before committing. - Confirm
.env.examplecontains placeholders only, never live credentials. - Confirm rotated keys are removed from old host configs, CI secrets, and local shells where applicable (verify on host).
- Confirm mobile app pointer-only submodules remain unfetched on this host; app secrets must not be copied into this server checkout.