Hello, I am new to frappe and i am making my own custom app
I want to provide a CLI command to automate creation of new ERPNext site/db on the same bench for a new client
and i want to be able to run this CLI command through Page or API Endpoint request with passing these paramteres (ClientID-SubscriptionID-VATID-ClientName)
Yes Meena, you can automatically create a new site in the same bench using a shell command. I have created a new site using a wildcard subdomain so that when a user adds a company name, it creates a new site based on that name.
Create a shell script named create_site.sh inside the frappe-bench directory to execute the necessary commands. Here’s an example script
#!/bin/bash
COMPANY=$1
BENCH_DIR=“/home/frappe/frappe-bench” # Move shell to frappe-bench directory
SITE_NAME=“${COMPANY,}.site.com” # Convert to lowercase and use as subdomain