Deploy Ladill QR Plus / deploy (push) Successful in 28s
Update defaults, SSO redirect, and deploy runbook for the new subdomain. Co-authored-by: Cursor <cursoragent@cursor.com>
2.4 KiB
2.4 KiB
Ladill QR Plus — deploy & cutover runbook
Standalone app for utility QR codes at qrplus.ladill.com (URL, WiFi, link
list, business, app download). vCard is a separate future product
(vcard.ladill.com). Commerce types (shop, menu, event, give, …) stay on the
platform until Merchant/Events/Give extract.
Trusts auth.ladill.com for SSO and bills the one platform UserWallet via the
Billing API. Public scans stay at ladill.com/q/<code> (nginx proxies to this
app for Plus codes after cutover).
0. Prerequisites
| Secret | Where |
|---|---|
LADILL_SSO_CLIENT_ID / LADILL_SSO_CLIENT_SECRET |
passport:client on platform |
BILLING_API_KEY_QR |
platform .env + this app |
IDENTITY_API_KEY_QR |
platform .env + this app |
1. Gitea repo + CI
- Repo: http://161.97.138.149:3000/isaacclad/ladill-qr-plus
- Push to
maintriggers.gitea/workflows/deploy.yml. - App root:
/var/www/ladill-qr-plus
2. Server app-slot + database
sudo install -d -o deploy -g www-data /var/www/ladill-qr-plus
sudo mysql -e "CREATE DATABASE ladill_qr_plus CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
sudo mysql -e "CREATE USER 'ladill_qr_plus'@'127.0.0.1' IDENTIFIED BY '<pw>';"
sudo mysql -e "GRANT ALL ON ladill_qr_plus.* TO 'ladill_qr_plus'@'127.0.0.1'; FLUSH PRIVILEGES;"
3. Register OIDC client (platform)
php artisan passport:client \
--name="Ladill QR Plus" \
--redirect_uri="https://qrplus.ladill.com/sso/callback"
4. Platform integration
BILLING_API_KEY_QR=<same>
IDENTITY_API_KEY_QR=<same>
RP_QR_FRONTCHANNEL_LOGOUT=https://qrplus.ladill.com/sso/logout-frontchannel
LADILL_QR_APP_URL=https://qrplus.ladill.com
5. nginx + TLS
sudo deployment/setup-service-subdomain-nginx.sh qrplus --app /var/www/ladill-qr-plus/current
Proxy ladill.com/q/* to this app after import (see platform nginx docs).
6. First deploy
cd /var/www/ladill-qr-plus/current
php artisan migrate --force
php artisan config:cache route:cache view:cache
7. Data migration
# platform
php artisan qr-plus:export --out=/tmp/qr-plus-export.json
# qr app
php artisan qr-plus:import /tmp/qr-plus-export.json --commit
8. Smoke test
https://qrplus.ladill.com/up→ 200- SSO login → create URL QR → wallet debited
https://ladill.com/q/<code>resolves (after nginx proxy)account.ladill.com/qr-codesredirects here