worker: Added new-site
This commit is contained in:
parent
1eae0313a0
commit
c2612c815c
@ -18,4 +18,7 @@ sudo apt install docker-compose -y
|
|||||||
sudo apt install nginx -y
|
sudo apt install nginx -y
|
||||||
|
|
||||||
# Install python prerequisites
|
# Install python prerequisites
|
||||||
python3 -m pip install -r requirements.txt
|
sudo apt install python3-pip -y
|
||||||
|
python3 -m pip install -r requirements.txt
|
||||||
|
cp .env.example .env
|
||||||
|
chmod +x wp.sh
|
@ -23,6 +23,10 @@ def new_site():
|
|||||||
sites_file = open('sites.txt', 'a')
|
sites_file = open('sites.txt', 'a')
|
||||||
sites_file.write(domain + '\n')
|
sites_file.write(domain + '\n')
|
||||||
|
|
||||||
|
# Setup site run wp.sh
|
||||||
|
# Get num sites
|
||||||
|
os.system('bash wp.sh ' + domain + ' '+ count)
|
||||||
|
|
||||||
# Return the domain and the number of sites
|
# Return the domain and the number of sites
|
||||||
return jsonify({'domain': domain, 'count': count})
|
return jsonify({'domain': domain, 'count': count})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user