6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-04 19:03:39 +00:00

docs: explain why docker-compose.jobs.yml exists

Based on:
https://github.com/overhangio/tutor/issues/642#issuecomment-1483970113
This commit is contained in:
Kyle McCormick 2023-04-28 10:29:58 -04:00 committed by Régis Behmo
parent 6771732414
commit 2e276cbb09

View File

@ -1,3 +1,16 @@
# Tutor provides the `tutor MODE do JOB ...` CLI as a consistent way to execute jobs
# across the dev, local, and k8s modes. To support jobs in the docker-compose modes
# (dev and local), we must define a `-job` variant service in which jobs could be run.
# When `tutor local do JOB ...` is invoked, we `docker-compose run` each of JOB's
# tasks against the appropriate `-job` services, as defined here.
# When `tutor dev do JOB ...` is invoked, we do the same, but also include any
# compose overrides in ../dev/docker-compose.jobs.yml.
# Note that these services will all be `run` rather than `start`ed and `exec`ed.
# This is because jobs are often used for initialization tasks, which may need to
# happen before the service can be successfully `start`ed.
version: "{{ DOCKER_COMPOSE_VERSION }}"
services: