Merge pull request #9 from Carlos-Muniz/Carlos-Muniz/add-COMPOSE_MOUNTS

feat: add COMPOSE_MOUNTS for xqueue
This commit is contained in:
Gonzalo Romero 2022-07-20 16:35:19 -05:00 committed by GitHub
commit 3b7d127fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,20 @@ tutor_hooks.Filters.IMAGES_PUSH.add_item((
"{{ XQUEUE_DOCKER_IMAGE }}", "{{ XQUEUE_DOCKER_IMAGE }}",
)) ))
@tutor_hooks.Filters.COMPOSE_MOUNTS.add()
def _mount_xqueue(volumes, name):
"""
When mounting xqueue with `--mount=/path/to/xqueue`,
bind-mount the host repo in the xqueue container.
"""
if name == "xqueue":
path = "/openedx/xqueue"
volumes += [
("xqueue", path),
("xqueue-job", path),
]
return volumes
@click.group(help="Interact with the Xqueue server", name="xqueue") @click.group(help="Interact with the Xqueue server", name="xqueue")
def command(): def command():
pass pass