Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(launch): keep containers stopped during build & init (WIP) #38

Draft
wants to merge 1 commit into
base: release
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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