Skip to content

Commit 2e276cb

Browse files
kdmccormickregisb
authored andcommitted
docs: explain why docker-compose.jobs.yml exists
Based on: #642 (comment)
1 parent 6771732 commit 2e276cb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tutor/templates/local/docker-compose.jobs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Tutor provides the `tutor MODE do JOB ...` CLI as a consistent way to execute jobs
2+
# across the dev, local, and k8s modes. To support jobs in the docker-compose modes
3+
# (dev and local), we must define a `-job` variant service in which jobs could be run.
4+
5+
# When `tutor local do JOB ...` is invoked, we `docker-compose run` each of JOB's
6+
# tasks against the appropriate `-job` services, as defined here.
7+
# When `tutor dev do JOB ...` is invoked, we do the same, but also include any
8+
# compose overrides in ../dev/docker-compose.jobs.yml.
9+
10+
# Note that these services will all be `run` rather than `start`ed and `exec`ed.
11+
# This is because jobs are often used for initialization tasks, which may need to
12+
# happen before the service can be successfully `start`ed.
13+
114
version: "{{ DOCKER_COMPOSE_VERSION }}"
215
services:
316

0 commit comments

Comments
 (0)