feat: add COMPOSE_MOUNTS for edx-notes-api
Co-authored-by: Carlos Muniz <cmuniz@trcil.org>
This commit is contained in:
parent
264dba749c
commit
19fef3d2d4
@ -35,3 +35,12 @@ Configuration
|
|||||||
- ``NOTES_MYSQL_USERNAME`` (default: ``"notes"``)
|
- ``NOTES_MYSQL_USERNAME`` (default: ``"notes"``)
|
||||||
|
|
||||||
These values can be modified with ``tutor config save --set PARAM_NAME=VALUE`` commands.
|
These values can be modified with ``tutor config save --set PARAM_NAME=VALUE`` commands.
|
||||||
|
|
||||||
|
Debugging
|
||||||
|
---------
|
||||||
|
|
||||||
|
To debug the notes API service, you are encouraged to mount the edx-notes-api repo from the host in the development container:
|
||||||
|
|
||||||
|
tutor dev start --mount /path/to/edx-notes-api
|
||||||
|
|
||||||
|
Feel free to add breakpoints (``breakpoint()``) anywhere in your source code to debug your application.
|
||||||
|
|||||||
@ -53,6 +53,20 @@ tutor_hooks.Filters.IMAGES_PUSH.add_item((
|
|||||||
"{{ NOTES_DOCKER_IMAGE }}",
|
"{{ NOTES_DOCKER_IMAGE }}",
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@tutor_hooks.Filters.COMPOSE_MOUNTS.add()
|
||||||
|
def _mount_edx_notes_api(volumes, name):
|
||||||
|
"""
|
||||||
|
When mounting edx-notes-api with `--mount=/path/to/edx-notes-api`,
|
||||||
|
bind-mount the host repo in the notes container.
|
||||||
|
"""
|
||||||
|
if name == "edx-notes-api":
|
||||||
|
path = "/app/edx-notes-api"
|
||||||
|
volumes += [
|
||||||
|
("notes", path),
|
||||||
|
("notes-job", path),
|
||||||
|
]
|
||||||
|
return volumes
|
||||||
|
|
||||||
####### Boilerplate code
|
####### Boilerplate code
|
||||||
# Add the "templates" folder as a template root
|
# Add the "templates" folder as a template root
|
||||||
tutor_hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(
|
tutor_hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user