Make it possible to override individual docker registry

This commit is contained in:
Régis Behmo 2020-07-21 09:11:04 +02:00
parent 96e2fd4302
commit c8dc0218dd
7 changed files with 12 additions and 12 deletions

View File

@ -10,13 +10,13 @@ Installation
------------
The plugin is currently bundled with the `binary releases of Tutor <https://github.com/overhangio/tutor/releases>`_. If you have installed Tutor from source, you will have to install this plugin from source, too::
pip install tutor-notes
Then, to enable this plugin, run::
tutor plugins enable notes
You should beware that the ``notes.<LMS_HOST>`` domain name should exist and point to your server. For instance, if your LMS is hosted at http://myopenedx.com, the notes service should be found at http://notes.myopenedx.com.
If you would like to host the notes service at a different domain name, you can set the ``NOTES_HOST`` configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.overhang.io.
@ -29,7 +29,7 @@ Configuration
- ``NOTES_MYSQL_PASSWORD`` (default: ``"{{ 8|random_string }}"``)
- ``NOTES_SECRET_KEY`` (default: ``"{{ 24|random_string }}"``)
- ``NOTES_OAUTH2_SECRET`` (default: ``"{{ 24|random_string }}"``)
- ``NOTES_DOCKER_IMAGE`` (default: ``"overhangio/openedx-notes:{{ NOTES_VERSION }}"``)
- ``NOTES_DOCKER_IMAGE`` (default: ``"{{ DOCKER_REGISTRY }}overhangio/openedx-notes:{{ NOTES_VERSION }}"``)
- ``NOTES_HOST`` (default: ``"notes.{{ LMS_HOST }}"``)
- ``NOTES_MYSQL_DATABASE`` (default: ``"notes"``)
- ``NOTES_MYSQL_USERNAME`` (default: ``"notes"``)

View File

@ -1 +1 @@
__version__ = "10.0.1"
__version__ = "10.1.0"

View File

@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: notes
image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}
image: {{ NOTES_DOCKER_IMAGE }}
ports:
- containerPort: 8000
env:

View File

@ -11,7 +11,7 @@ spec:
restartPolicy: Never
containers:
- name: notes
image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}
image: {{ NOTES_DOCKER_IMAGE }}
env:
- name: DJANGO_SETTINGS_MODULE
value: notesserver.settings.tutor

View File

@ -1,5 +1,5 @@
notes-job:
image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}
image: {{ NOTES_DOCKER_IMAGE }}
environment:
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
volumes:

View File

@ -1,6 +1,6 @@
############# Notes: backend store for edX Student Notes
notes:
image: {{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}
image: {{ NOTES_DOCKER_IMAGE }}
environment:
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
volumes:

View File

@ -14,7 +14,7 @@ config = {
},
"defaults": {
"VERSION": __version__,
"DOCKER_IMAGE": "overhangio/openedx-notes:{{ NOTES_VERSION }}",
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY }}overhangio/openedx-notes:{{ NOTES_VERSION }}",
"HOST": "notes.{{ LMS_HOST }}",
"MYSQL_DATABASE": "notes",
"MYSQL_USERNAME": "notes",
@ -24,8 +24,8 @@ config = {
templates = pkg_resources.resource_filename("tutornotes", "templates")
hooks = {
"init": ["mysql", "lms", "notes"],
"build-image": {"notes": "{{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}"},
"remote-image": {"notes": "{{ DOCKER_REGISTRY }}{{ NOTES_DOCKER_IMAGE }}"},
"build-image": {"notes": "{{ NOTES_DOCKER_IMAGE }}"},
"remote-image": {"notes": "{{ NOTES_DOCKER_IMAGE }}"},
}