-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker_run.py
More file actions
68 lines (47 loc) · 1.64 KB
/
Copy pathdocker_run.py
File metadata and controls
68 lines (47 loc) · 1.64 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
import os
os.system("tput setaf 1")
print("\n\t\t\t--------------------------------------")
print("")
print("\t\t\t <== Welcome to Docker Services ==>")
print("")
print("\t\t\t----------------------------------------")
os.system("tput setaf 4")
while True:
print("""
1: Launch Wordpress Infrastructure
2: Lauch Owncloud Infrastructure
3: Lauch Joomla Infrastructure
4: Stop & Remove Joomla Infrastructure
5: Stop & Remove Wordpress Infrastructure
6: Stop & Remove Owncloud Infrastructure
7: Exit
""")
os.system("tput setaf 6")
ch = int(input("Enter your choice : "))
os.system("tput setaf 7")
if ch == 1:
print("To acces the webpage : In any browser type : <IP Adress>/8081:80")
os.chdir("/root/Docker-Project/wordpress/")
os.system("docker-compose up -d")
elif ch == 2:
print("To acces the webpage : In any browser type : <IP Adress>/8082:80")
os.chdir("/root/Docker-Project/owncloud/")
os.system("docker-compose up -d")
elif ch == 3:
print("To acces the webpage : In any browser type : <IP Adress>/8083:80")
os.chdir("/root/Docker-Project/joomla/")
os.system("docker-compose up -d")
elif ch == 4:
os.chdir("/root/Docker-Project/joomla/")
os.system("docker-compose stop")
os.system("docker-compose rm")
elif ch == 5:
os.chdir("/root/Docker-Project/wordpress/")
os.system("docker-compose stop")
os.system("docker-compose rm")
elif ch == 6:
os.chdir("/root/Docker-Project/owncloud/")
os.system("docker-compose stop")
os.system("docker-compose rm")
elif ch == 7:
exit()