Extract Ladill QR Plus as standalone app at qr.ladill.com.
Deploy Ladill QR Plus / deploy (push) Failing after 1s
Deploy Ladill QR Plus / deploy (push) Failing after 1s
Utility QR types only (URL, WiFi, link list, business, app download) with SSO, Billing API integration, public /q resolver, and qr-plus:import for platform migration. vCard and commerce types stay on the platform. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
# Ladill QR Plus — deploy & cutover runbook
|
||||
|
||||
Standalone app for **utility QR codes** at `qr.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
|
||||
|
||||
1. Repo: **http://161.97.138.149:3000/isaacclad/ladill-qr-plus**
|
||||
2. Push to `main` triggers `.gitea/workflows/deploy.yml`.
|
||||
3. App root: `/var/www/ladill-qr-plus`
|
||||
|
||||
## 2. Server app-slot + database
|
||||
|
||||
```bash
|
||||
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)
|
||||
|
||||
```bash
|
||||
php artisan passport:client \
|
||||
--name="Ladill QR Plus" \
|
||||
--redirect_uri="https://qr.ladill.com/sso/callback"
|
||||
```
|
||||
|
||||
## 4. Platform integration
|
||||
|
||||
```env
|
||||
BILLING_API_KEY_QR=<same>
|
||||
IDENTITY_API_KEY_QR=<same>
|
||||
RP_QR_FRONTCHANNEL_LOGOUT=https://qr.ladill.com/sso/logout-frontchannel
|
||||
LADILL_QR_APP_URL=https://qr.ladill.com
|
||||
```
|
||||
|
||||
## 5. nginx + TLS
|
||||
|
||||
```bash
|
||||
sudo deployment/setup-service-subdomain-nginx.sh qr --app ladill-qr-plus
|
||||
```
|
||||
|
||||
Proxy `ladill.com/q/*` to this app after import (see platform nginx docs).
|
||||
|
||||
## 6. First deploy
|
||||
|
||||
```bash
|
||||
cd /var/www/ladill-qr-plus/current
|
||||
php artisan migrate --force
|
||||
php artisan config:cache route:cache view:cache
|
||||
```
|
||||
|
||||
## 7. Data migration
|
||||
|
||||
```bash
|
||||
# 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://qr.ladill.com/up` → 200
|
||||
- SSO login → create URL QR → wallet debited
|
||||
- `https://ladill.com/q/<code>` resolves (after nginx proxy)
|
||||
- `account.ladill.com/qr-codes` redirects here
|
||||
Reference in New Issue
Block a user