|
|
@ -2,6 +2,7 @@ import sys
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
import datetime
|
|
|
|
import datetime
|
|
|
|
|
|
|
|
from xmlrpc.client import DateTime
|
|
|
|
import docker
|
|
|
|
import docker
|
|
|
|
from colorama import Fore, Style
|
|
|
|
from colorama import Fore, Style
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
@ -56,7 +57,7 @@ def health_checks(deadline):
|
|
|
|
|
|
|
|
|
|
|
|
if exit_code == 0:
|
|
|
|
if exit_code == 0:
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
elif exit_code != 0 and deadline > datetime.now():
|
|
|
|
elif exit_code != 0 and deadline > datetime.datetime.now():
|
|
|
|
stop(exit_code)
|
|
|
|
stop(exit_code)
|
|
|
|
|
|
|
|
|
|
|
|
def print_logs():
|
|
|
|
def print_logs():
|
|
|
@ -84,7 +85,7 @@ def hooks():
|
|
|
|
|
|
|
|
|
|
|
|
# Start up containers
|
|
|
|
# Start up containers
|
|
|
|
sys.stdout.flush()
|
|
|
|
sys.stdout.flush()
|
|
|
|
deadline=datetime.now()+datetime.timedelta(minutes=timeout)
|
|
|
|
deadline=datetime.datetime.now()+datetime.timedelta(minutes=timeout)
|
|
|
|
print(subprocess.check_output("docker-compose -f " + compose_file + " up -d", shell=True).decode())
|
|
|
|
print(subprocess.check_output("docker-compose -f " + compose_file + " up -d", shell=True).decode())
|
|
|
|
print()
|
|
|
|
print()
|
|
|
|
print(Fore.LIGHTMAGENTA_EX + "Sleeping for 10s" + Style.RESET_ALL)
|
|
|
|
print(Fore.LIGHTMAGENTA_EX + "Sleeping for 10s" + Style.RESET_ALL)
|
|
|
|