mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 09:20:20 +08:00
controller
This commit is contained in:
parent
40abab1b49
commit
320753fd57
Binary file not shown.
@ -32,23 +32,26 @@ class Create:
|
|||||||
def downRepo(self):
|
def downRepo(self):
|
||||||
'''download repository'''
|
'''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):
|
if os.path.exists("./"+self.folder):
|
||||||
print(os.path.abspath(self.folder)+" folder already exists")
|
print(os.path.abspath(self.folder)+" folder already exists")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
GitOp.gitClone(cmd)
|
gitop.gitClone(cmd)
|
||||||
|
|
||||||
def setEnv(self):
|
def setEnv(self):
|
||||||
'''set the usable port for application'''
|
'''set the usable port for application'''
|
||||||
fileop=FileOp()
|
fileop=model.FileOp()
|
||||||
print(fileop.fileToJson('./joomla/.env_all'))
|
print(fileop.fileToJson('./drupal/.env'))
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def upRepo(self):
|
def upRepo(self):
|
||||||
'''docker-compose up repository'''
|
'''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)
|
print(cmd)
|
||||||
os.chdir(self.folder)
|
os.chdir(self.folder)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 93735135cf4529fc7830446bb6604f7c15daae2f
|
|
Loading…
Reference in New Issue
Block a user