Kit-a-Rig hosted deployment

Create a licensing MySQL database and import operator/private/schema.sql. Create an operator
database user with SELECT, INSERT and UPDATE. Point licensing.kit-a-rig.com over HTTPS at operator/public.
Copy its config.example.php to config.php outside the document root. Supply the operator login
and a strong password hash generated with PHP password_hash(). Use a registry account with
SELECT only for tenant licence lookups.

Create a separate folder and MySQL database for each company. Point its subdomain at its own
public folder. Use a database account scoped only to that company's database. For Artistic
Solutions Scotland, back up the existing database, pause writes during the final copy, import
into its own database and verify before changing the live address. Keep the original intact
until validated. Configure its own mail and other secrets in private/config.php.

In Artistic Solutions Scotland private/config.php set the tenant database credentials and add:
 'public_url'=>'https://artistic-solutions-scotland.kit-a-rig.com',
 'licensing'=>[
   'host'=>'artistic-solutions-scotland.kit-a-rig.com',
   'dsn'=>'mysql:host=localhost;dbname=LICENCE_DB;charset=utf8mb4',
   'username'=>'REGISTRY_READ_ONLY_USER',
   'password'=>'REGISTRY_READ_ONLY_PASSWORD',
 ],

Register the same hostname in the operator dashboard and enter the expiry date and staff limit.
The company home page serves its public hire catalogue. Staff sign in at /login.html.
Register the domain and configure DNS and TLS before going live. The root domain can host a
separate marketing site. Setting up DNS and databases is a hosting step. Saving a licence in
the dashboard does not provision servers or move existing records.

Expired licences allow sign-in and reads and block changes and public enquiry submissions.
Reducing a staff limit leaves existing users active and blocks adding accounts at the new limit.
