Skip to content
Permalink
a57418b67b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 52 lines (39 sloc) 956 Bytes
#!/usr/bin/env python3
from utils.settings import BASE_DIR, load_config
from utils.functions import run
import subprocess
import shlex
import os
from time import sleep
def stop( env ):
# run application
subprocess.call(
"docker-compose down",
shell=True,
env=env
)
if __name__ == '__main__':
from argparse import ArgumentParser
config = load_config()
parser = ArgumentParser(
description="restart the webserver"
)
parser.add_argument(
"--build",
action = "store_true"
)
parser.add_argument(
"CMD",
nargs="*"
)
args = parser.parse_args()
stop( config )
CMD= \
(vars(args)['CMD'])
run(
env=config,
build = args.build,
cmd=CMD
)
print("\n------------------------------\n")
print("You can view the tail of container log output with 'docker-compose logs -f' (ctrl + c to stop).")