6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-13 14:43:03 +00:00

fix: bypass build to accelerate "local start"

Previously, we were building all images every time we ran a "local start"
command. This was causing unnecessary rebuild. Here, instead, we make use of
the `docker-compose up --build`. This means that only the required images will
be rebuilt.
This commit is contained in:
Régis Behmo 2021-10-05 00:29:26 +02:00 committed by Régis Behmo
parent 0a8d92f8d4
commit 079fb1c9ec
2 changed files with 3 additions and 3 deletions

View File

@ -4,6 +4,8 @@ Note: Breaking changes between versions are indicated by "💥".
## Unreleased ## Unreleased
- [Improvement] Faster `tutor local start` by building only necessary images.
## v12.1.5 (2021-10-25) ## v12.1.5 (2021-10-25)
- 💥[Improvement] Change the `settheme` command such that, by default, a custom theme is assigned to the LMS and the CMS, both in production and development mode. - 💥[Improvement] Change the `settheme` command such that, by default, a custom theme is assigned to the LMS and the CMS, both in production and development mode.

View File

@ -65,13 +65,11 @@ class ComposeJobRunner(jobs.BaseJobRunner):
@click.argument("services", metavar="service", nargs=-1) @click.argument("services", metavar="service", nargs=-1)
@click.pass_obj @click.pass_obj
def start(context: Context, detach: bool, services: List[str]) -> None: def start(context: Context, detach: bool, services: List[str]) -> None:
command = ["up", "--remove-orphans"] command = ["up", "--remove-orphans", "--build"]
if detach: if detach:
command.append("-d") command.append("-d")
config = tutor_config.load(context.root) config = tutor_config.load(context.root)
# Rebuild Docker images with a `build: ...` context.
context.docker_compose(context.root, config, "build")
# Start services # Start services
context.docker_compose(context.root, config, *command, *services) context.docker_compose(context.root, config, *command, *services)