# Ladill Servers — deploy & cutover runbook Standalone app for **VPS and dedicated servers** at `servers.ladill.com`. Shared web hosting lives on `hosting.ladill.com`. Mirrors the Ladill Hosting / Domains deployment model (app-slot + own DB + Gitea CI). --- ## 1. Gitea repo + CI 1. Repo: **ladill-servers** on Gitea 2. Push to `main` triggers `.gitea/workflows/deploy.yml` 3. Deploy path: `/var/www/ladill-servers/current` ## 2. Server app-slot + database ```bash sudo install -d -o deploy -g www-data /var/www/ladill-servers sudo mysql -e "CREATE DATABASE ladill_servers CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" sudo mysql -e "CREATE USER 'ladill_servers'@'127.0.0.1' IDENTIFIED BY '';" sudo mysql -e "GRANT ALL ON ladill_servers.* TO 'ladill_servers'@'127.0.0.1'; FLUSH PRIVILEGES;" ``` Create `/var/www/ladill-servers/.env` from `.env.example`, fill secrets, then `php artisan key:generate`. ## 3. Register the OIDC client (platform / auth.ladill.com) ```bash php artisan passport:client \ --name="Ladill Servers" \ --redirect_uri="https://servers.ladill.com/sso/callback" ``` Set `LADILL_SSO_CLIENT_ID` / `LADILL_SSO_CLIENT_SECRET` in this app's `.env`. ## 4. Platform integration On the **platform** `.env`: ```env BILLING_API_KEY_SERVERS= IDENTITY_API_KEY_SERVERS= RP_SERVERS_FRONTCHANNEL_LOGOUT=https://servers.ladill.com/sso/logout-frontchannel LADILL_SERVERS_APP_URL=https://servers.ladill.com ``` Then `php artisan config:cache` on the platform. ## 5. nginx + TLS ```bash sudo deployment/setup-service-subdomain-nginx.sh servers --app ladill-servers ``` ## 6. First deploy Push to `main`, then: ```bash cd /var/www/ladill-servers/current php artisan migrate --force php artisan db:seed --class=ServerProductSeeder --force php artisan config:cache route:cache view:cache ``` Ensure a queue worker runs via supervisor (`ladill-servers-worker:*`). ## 7. Smoke test - `https://servers.ladill.com/up` → 200 - Logged-out → SSO redirect to auth.ladill.com - Logged-in → dashboard, VPS and dedicated pages load - Launcher shows Servers icon; home hub no longer "Soon"