6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-12 06:07:56 +00:00

Load config files as mounted volumes

This allows changing the openedx config without rebuilding the image.
This commit is contained in:
Régis Behmo 2018-04-27 23:33:48 +02:00
parent fb71baf917
commit b6dd4130e6
2 changed files with 15 additions and 9 deletions

View File

@ -58,6 +58,7 @@ services:
SERVICE_VARIANT: lms SERVICE_VARIANT: lms
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./openedx/config:/openedx/config
- ./data/lms:/openedx/data - ./data/lms:/openedx/data
depends_on: depends_on:
- memcached - memcached
@ -73,6 +74,7 @@ services:
SERVICE_VARIANT: cms SERVICE_VARIANT: cms
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./openedx/config:/openedx/config
- ./data/cms:/openedx/data - ./data/cms:/openedx/data
depends_on: depends_on:
- memcached - memcached
@ -94,6 +96,7 @@ services:
environment: environment:
C_FORCE_ROOT: "1" # run celery tasks as root #nofear C_FORCE_ROOT: "1" # run celery tasks as root #nofear
volumes: volumes:
- ./openedx/config:/openedx/config
- ./data/lms_worker:/openedx/data - ./data/lms_worker:/openedx/data
depends_on: depends_on:
- lms - lms
@ -108,6 +111,7 @@ services:
environment: environment:
C_FORCE_ROOT: "1" # run celery tasks as root #nofear C_FORCE_ROOT: "1" # run celery tasks as root #nofear
volumes: volumes:
- ./openedx/config:/openedx/config
- ./data/cms_worker:/openedx/data - ./data/cms_worker:/openedx/data
depends_on: depends_on:
- cms - cms

View File

@ -38,15 +38,17 @@ RUN pip install --src ../venv/src -r requirements/edx/paver.txt
# Install nodejs requirements # Install nodejs requirements
RUN npm install RUN npm install
# Copy configuration files # Copy configuration files in common folder (which can later be mounted as a volume)
COPY ./config/production_lms.py /openedx/edx-platform/lms/envs/production.py RUN mkdir /openedx/config
COPY ./config/production_cms.py /openedx/edx-platform/cms/envs/production.py COPY ./config/* /openedx/config/
COPY ./config/production_common.py /openedx/edx-platform/lms/envs/production_common.py RUN ln -s /openedx/config/production_lms.py /openedx/edx-platform/lms/envs/production.py \
COPY ./config/production_common.py /openedx/edx-platform/cms/envs/production_common.py && ln -s /openedx/config/production_cms.py /openedx/edx-platform/cms/envs/production.py \
COPY ./config/lms.env.json /openedx/ && ln -s /openedx/config/production_common.py /openedx/edx-platform/lms/envs/production_common.py \
COPY ./config/cms.env.json /openedx/ && ln -s /openedx/config/production_common.py /openedx/edx-platform/cms/envs/production_common.py
COPY ./config/lms.auth.json /openedx/ RUN ln -s /openedx/config/lms.env.json /openedx/ \
COPY ./config/cms.auth.json /openedx/ && ln -s /openedx/config/cms.env.json /openedx/ \
&& ln -s /openedx/config/lms.auth.json /openedx/ \
&& ln -s /openedx/config/cms.auth.json /openedx/
# Copy convenient scripts # Copy convenient scripts
COPY ./wait-for-greenlight.sh /usr/local/bin/ COPY ./wait-for-greenlight.sh /usr/local/bin/