Skip to content

Commit

Permalink
perf(launch): keep containers stopped during build & init
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Dec 4, 2023
1 parent ff8091b commit d41493d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tutor/commands/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,26 @@ def launch(

config = tutor_config.load(context.obj.root)

click.echo(fmt.title("Stopping any existing platform"))
context.invoke(stop)

if not skip_build:
click.echo(fmt.title("Building Docker images"))
images_to_build = hooks.Filters.IMAGES_BUILD_REQUIRED.apply([], context_name)
if not images_to_build:
fmt.echo_info("No image to build")
context.invoke(images.build, image_names=images_to_build)

click.echo(fmt.title("Stopping any existing platform"))
context.invoke(stop)

if pullimages:
click.echo(fmt.title("Docker image updates"))
context.invoke(dc_command, command="pull")

click.echo(fmt.title("Starting the platform in detached mode"))
context.invoke(start, detach=True)

click.echo(fmt.title("Database creation and migrations"))
context.invoke(do.commands["init"])

click.echo(fmt.title("Starting the platform in detached mode"))
context.invoke(start, detach=True)

# Print the urls of the user-facing apps
public_app_hosts = ""
for host in hooks.Filters.APP_PUBLIC_HOSTS.iterate(context_name):
Expand Down

0 comments on commit d41493d

Please sign in to comment.