feat: FORUM_MONGODB_DATABASE config val added to fix the hardcoded forum database name

In config.yml the new value FORUM_MONGO_DB_DATABASE was added with `cs_comments_service` as default value.
In docker-entrypoint.sh of forum I changed the hardcoded `cs_commecnts_service` with the new config value.
Multiple .yml files changed to handle the new config value.
This commit is contained in:
ChrisChV 2021-06-15 20:15:03 -05:00 committed by Régis Behmo
parent ef189e7f67
commit d6af5ef55b
8 changed files with 11 additions and 1 deletions

View File

@ -9,6 +9,8 @@ Note: Breaking changes between versions are indicated by "💥".
- [Bugfix] Fix "upstream sent too big header" error during login of existing users after a Koa to Lilac upgrade.
- [Feature] Added the ability to skip `config.yml` file modification while running `tutor config save` command with `-e` or `--env-only` flag.
- [Feature] Add new config value `FORUM_MONGODB_DATABASE` to set the forum database name
## v12.0.0 (2021-06-09)
- 💥[Improvement] Upgrade all services to open-release/lilac.master.

View File

@ -48,5 +48,6 @@ ENV MONGODB_AUTH ""
ENV MONGOID_AUTH_MECH ""
ENV MONGODB_HOST "mongodb"
ENV MONGODB_PORT "27017"
ENV MONGODB_DATABASE "cs_comments_service"
EXPOSE 4567
CMD ./bin/unicorn -c config/unicorn_tcp.rb -I '.'

View File

@ -1,6 +1,6 @@
#!/bin/sh -e
export MONGOHQ_URL="mongodb://$MONGODB_AUTH$MONGODB_HOST:$MONGODB_PORT/cs_comments_service"
export MONGOHQ_URL="mongodb://$MONGODB_AUTH$MONGODB_HOST:$MONGODB_PORT/$MONGODB_DATABASE"
# the search server variable was renamed after the upgrade to elasticsearch 7
export SEARCH_SERVER_ES7="$SEARCH_SERVER"

View File

@ -41,6 +41,7 @@ ELASTICSEARCH_PORT: 9200
ELASTICSEARCH_SCHEME: "http"
ELASTICSEARCH_HEAP_SIZE: 1g
FORUM_HOST: "forum"
FORUM_MONGODB_DATABASE: "cs_comments_service"
JWT_COMMON_AUDIENCE: "openedx"
JWT_COMMON_ISSUER: "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/oauth2"
JWT_COMMON_SECRET_KEY: "{{ OPENEDX_SECRET_KEY }}"

View File

@ -153,6 +153,8 @@ spec:
value: "{{ MONGODB_HOST }}"
- name: MONGODB_PORT
value: "{{ MONGODB_PORT }}"
- name: MONGODB_DATABASE
value: "{{ FORUM_MONGODB_DATABASE }}"
{% endif %}
{% if RUN_LMS %}
---

View File

@ -101,6 +101,8 @@ spec:
value: "{{ MONGODB_HOST }}"
- name: MONGODB_PORT
value: "{{ MONGODB_PORT }}"
- name: MONGODB_DATABASE
value: "{{ FORUM_MONGODB_DATABASE }}"
{{ patch("k8s-jobs") }}

View File

@ -36,6 +36,7 @@ services:
MONGODB_AUTH: "{% if MONGODB_USERNAME and MONGODB_PASSWORD %}{{ MONGODB_USERNAME}}:{{ MONGODB_PASSWORD }}@{% endif %}"
MONGODB_HOST: "{{ MONGODB_HOST }}"
MONGODB_PORT: "{{ MONGODB_PORT }}"
MONGODB_DATABASE: "{{ FORUM_MONGODB_DATABASE }}"
depends_on: {{ [("elasticsearch", RUN_ELASTICSEARCH), ("mongodb", RUN_MONGODB)]|list_if }}
{{ patch("local-docker-compose-jobs-services")|indent(4) }}

View File

@ -69,6 +69,7 @@ services:
MONGODB_AUTH: "{% if MONGODB_USERNAME and MONGODB_PASSWORD %}{{ MONGODB_USERNAME}}:{{ MONGODB_PASSWORD }}@{% endif %}"
MONGODB_HOST: "{{ MONGODB_HOST }}"
MONGODB_PORT: "{{ MONGODB_PORT }}"
MONGODB_DATABASE: "{{ FORUM_MONGODB_DATABASE }}"
restart: unless-stopped
depends_on: {{ [("elasticsearch", RUN_ELASTICSEARCH), ("mongodb", RUN_MONGODB)]|list_if }}
{% endif %}