Enable storefront provision from Add Domain via optional git URL.

Persist deploy_slug on domains, call the websites agent /provision endpoint, and drop the hard-coded host map so Deploy appears from the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-08 14:07:56 +03:30
co-authored by Cursor
parent 9ca6e2306f
commit d933aef40b
15 changed files with 604 additions and 46 deletions
@@ -0,0 +1,21 @@
-- Storefront deploy wiring (Super Admin Add Domain + git URL)
ALTER TABLE domains
ADD COLUMN IF NOT EXISTS deploy_slug VARCHAR(64),
ADD COLUMN IF NOT EXISTS git_repo_url VARCHAR(512);
CREATE UNIQUE INDEX IF NOT EXISTS domains_deploy_slug_unique
ON domains (deploy_slug)
WHERE deploy_slug IS NOT NULL;
-- Existing websites VM sites
UPDATE domains
SET deploy_slug = 'ali-mohammadi',
git_repo_url = COALESCE(git_repo_url, 'git@git.meshkee.com:Meshkee-Websites/ali-mohammadi.git')
WHERE host = 'ali-mohammadi.ir'
AND deploy_slug IS NULL;
UPDATE domains
SET deploy_slug = 'meshkee',
git_repo_url = COALESCE(git_repo_url, 'git@git.meshkee.com:Meshkee-Websites/meshkee.git')
WHERE host = 'meshkee.com'
AND deploy_slug IS NULL;