mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-06-09 01:02:21 +00:00
f984361d9c
Before this commit, setting up an edx-platform development environment took multiple steps: tutor dev launch tutor dev run --mount=/path/to/edx-platform lms bash >> pip install -e . >> npm clean-install >> openedx-assets build --env=dev This commit moves the steps under ``run`` into an init task, which is automatically run by ``launch``. Thus, setup is now one command: tutor dev launch --mount=edx-platform These extra init steps are only applicable when bind-mounting edx-platform (because bind-mounting the repository overrides some important artifacts that exist on the image, which must be re-generated). Thus, the new init tasks exists early if it detects that it is *not* operating on a bind-mounted repository. Finally, we try to simplify the Open edX development docs so that it is clearer how bind-mounting fits into the development process. These bind-mounts: * ../build/openedx/themes:/openedx/themes * ../build/openedx/requirements:/openedx/requirements existed in the dev lms and cms containers, but they did not exist in the lms-job and cms-job containers. This means that themes and requirements that were *built into the image* would exist in the job containers, but live updates to the themes and requirements would not apply. To resolve this, we set ``volumes:`` on the lms-job and cms-job services so that they match the volumes for the normal lms and cms services. Part of: https://github.com/openedx/wg-developer-experience/issues/146 Closes: https://github.com/openedx/wg-developer-experience/issues/152 This works around (but does not close) these related issues: * https://github.com/openedx/wg-developer-experience/issues/150 * https://github.com/openedx/wg-developer-experience/issues/151
31 lines
885 B
YAML
31 lines
885 B
YAML
version: "{{ DOCKER_COMPOSE_VERSION }}"
|
|
|
|
x-openedx-job-service:
|
|
&openedx-job-service
|
|
image: {{ DOCKER_IMAGE_OPENEDX_DEV }}
|
|
build:
|
|
context: ../build/openedx/
|
|
target: development
|
|
args:
|
|
# Note that we never build the openedx-dev image with root user ID, as it would simply fail.
|
|
APP_USER_ID: "{{ HOST_USER_ID or 1000 }}"
|
|
volumes:
|
|
# Settings & config
|
|
- ../apps/openedx/settings/lms:/openedx/edx-platform/lms/envs/tutor:ro
|
|
- ../apps/openedx/settings/cms:/openedx/edx-platform/cms/envs/tutor:ro
|
|
- ../apps/openedx/config:/openedx/config:ro
|
|
# theme files
|
|
- ../build/openedx/themes:/openedx/themes
|
|
# editable requirements
|
|
- ../build/openedx/requirements:/openedx/requirements
|
|
|
|
services:
|
|
|
|
lms-job:
|
|
<<: *openedx-job-service
|
|
|
|
cms-job:
|
|
<<: *openedx-job-service
|
|
|
|
{{ patch("dev-docker-compose-jobs-services")|indent(2) }}
|