mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
controller
This commit is contained in:
parent
40abab1b49
commit
320753fd57
3 changed files with 8 additions and 6 deletions
Binary file not shown.
|
@ -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
|
Loading…
Reference in a new issue