controller

This commit is contained in:
chendelin1982 2021-10-08 15:03:27 +08:00
parent 40abab1b49
commit 320753fd57
3 changed files with 8 additions and 6 deletions

View file

@ -32,23 +32,26 @@ class Create:
def downRepo(self):
'''download repository'''
cmd = "git clone --depth=1 " + model.SmoothUrl.res(github_url) + "/websoft9/docker-" + self.app_name + " " + self.folder
geturl = model.SmoothUrl()
gitop = model.GitOp()
cmd = "git clone --depth=1 " + geturl.res(github_url) + "/websoft9/docker-" + self.app_name + " " + self.folder
if os.path.exists("./"+self.folder):
print(os.path.abspath(self.folder)+" folder already exists")
sys.exit(0)
else:
GitOp.gitClone(cmd)
gitop.gitClone(cmd)
def setEnv(self):
'''set the usable port for application'''
fileop=FileOp()
print(fileop.fileToJson('./joomla/.env_all'))
fileop=model.FileOp()
print(fileop.fileToJson('./drupal/.env'))
pass
def upRepo(self):
'''docker-compose up repository'''
cmd = "docker-compose -f docker-compose-production.yml --env-file .env_all up -d"
cmd = "docker-compose up -d"
print(cmd)
os.chdir(self.folder)
os.system(cmd)

@ -1 +0,0 @@
Subproject commit 93735135cf4529fc7830446bb6604f7c15daae2f