worker: Added new-site
All checks were successful
Build Docker / Build Master (push) Successful in 25s
Build Docker / Build Bot (push) Successful in 30s

This commit is contained in:
Nathan Woodburn 2023-08-17 13:10:12 +10:00
parent 1eae0313a0
commit c2612c815c
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 8 additions and 1 deletions

View File

@ -18,4 +18,7 @@ sudo apt install docker-compose -y
sudo apt install nginx -y
# 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

View File

@ -23,6 +23,10 @@ def new_site():
sites_file = open('sites.txt', 'a')
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 jsonify({'domain': domain, 'count': count})