-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_app.py
More file actions
69 lines (64 loc) · 1.69 KB
/
Copy pathdeploy_app.py
File metadata and controls
69 lines (64 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from flask import Flask, stream_with_context, request, Response, render_template, make_response
from ssh import *
def getEnvList(backend, environment, folder, domain):
return {
"0": {
"name": environment,
"command": "stop",
"github": "",
"domain": "",
"folder": folder
},
"1": {
"name": environment,
"command": "remove",
"github": "",
"domain": "",
"folder": folder
},
"2": {
"name": environment,
"command": "download",
"github": backend,
"domain": domain,
"folder": folder
},
# "3": {
# "name": "project-static",
# "command": "download",
# # "github": "faas-ovh/www",
# "github": frontend,
# "domain": "2.faas.ovh",
# "folder": "2.faas.ovh"
# },
# "4": {
# "name": environment,
# "command": "install",
# "github": "",
# "domain": "",
# "folder": "2.faas.ovh"
# },
}
def getGithub(github, project, domain, folder):
return {
"1": {
"name": project,
"command": "download",
# "github": "faas-ovh/www",
"github": github,
"domain": domain,
"folder": folder
},
}
def getEnvProjects(project, folder, commands):
result = {}
x = 1
for cmd in commands:
result[x] = {
"name": project,
"command": cmd,
"folder": folder
}
x += 1
# print(result)
return result