Merge ~gtrkiller/charm-k8s-discourse:master into charm-k8s-discourse:master

Proposed by Franco Luciano Forneron Buschiazzo
Status: Merged
Approved by: Tom Haddon
Approved revision: b5405ef68636808e3b1369a68249e127a0a43c70
Merged at revision: 1d8811cc1023208d0a2473c47aebe1f4dccb6783
Proposed branch: ~gtrkiller/charm-k8s-discourse:master
Merge into: charm-k8s-discourse:master
Diff against target: 27 lines (+16/-0)
1 file modified
image/Dockerfile (+16/-0)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Arturo Enrique Seijas Fernández (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+429601@code.launchpad.net

Commit message

Add discourse mermaid plugin support

Description of the change

Changes have been made so we can have a docker image type that also has mermaid on top of the existent markdown, saml and solved plugins.

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

One question inline about the inclusion of https://github.com/discourse/docker_manager.git

Revision history for this message
Arturo Enrique Seijas Fernández (arturo-seijas) :
review: Needs Fixing
Revision history for this message
Tom Haddon (mthaddon) wrote :

One reply to Arturo's comment

Revision history for this message
Arturo Enrique Seijas Fernández (arturo-seijas) wrote :

IDK what happened to my comments so I'm adding them again

review: Needs Fixing
Revision history for this message
Franco Luciano Forneron Buschiazzo (gtrkiller) :
Revision history for this message
Arturo Enrique Seijas Fernández (arturo-seijas) wrote :

LGTM. Thnx

review: Approve
Revision history for this message
Tom Haddon (mthaddon) wrote :

Looks good, thanks.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 1d8811cc1023208d0a2473c47aebe1f4dccb6783

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/image/Dockerfile b/image/Dockerfile
2index 316ca9b..e918089 100644
3--- a/image/Dockerfile
4+++ b/image/Dockerfile
5@@ -100,6 +100,22 @@ RUN cd ${CONTAINER_APP_ROOT}/app && su -s /bin/bash -c 'bin/bundle install' ${CO
6
7 RUN echo "markdown-saml-solved image complete"
8
9+FROM base-image AS markdown-mermaid-saml-solved
10+
11+RUN git clone https://github.com/discourse/discourse-saml.git ${CONTAINER_APP_ROOT}/app/plugins/discourse-saml
12+# Remove additions incompatible with Discourse versions < 2.8
13+RUN cd ${CONTAINER_APP_ROOT}/app/plugins/discourse-saml && git reset --hard 851f6cebe3fdd48019660b236a447abb6ddf9c89
14+RUN git clone https://github.com/discourse/discourse-solved.git ${CONTAINER_APP_ROOT}/app/plugins/discourse-solved
15+RUN git clone https://github.com/canonical-web-and-design/discourse-markdown-note.git ${CONTAINER_APP_ROOT}/app/plugins/discourse-markdown-note
16+RUN git clone https://github.com/unfoldingWord-dev/discourse-mermaid.git ${CONTAINER_APP_ROOT}/app/plugins/discourse-mermaid
17+RUN chown -R ${CONTAINER_APP_USERNAME}:${CONTAINER_APP_GROUP} ${CONTAINER_APP_ROOT}/app/plugins
18+# Have to determine the gems needed and install them now, otherwise Discourse will
19+# try to install them at runtime, which may not work due to network access issues.
20+RUN cd ${CONTAINER_APP_ROOT}/app/plugins/discourse-saml && install -d -o ${CONTAINER_APP_USERNAME} gems && echo 'source "https://rubygems.org"' > Gemfile ; grep -e ^gem plugin.rb >> Gemfile && su -s /bin/bash -c 'gem install bundler' ${CONTAINER_APP_USERNAME} && su -s /bin/bash -c '${CONTAINER_APP_ROOT}/app/bin/bundle install --gemfile=Gemfile --path=${CONTAINER_APP_ROOT}/app/plugins/discourse-saml/gems' ${CONTAINER_APP_USERNAME} && cd gems && ln -s ruby/* ./
21+RUN cd ${CONTAINER_APP_ROOT}/app && su -s /bin/bash -c 'bin/bundle install' ${CONTAINER_APP_USERNAME}
22+
23+RUN echo "markdown-mermaid-saml-solved image complete"
24+
25 # Build the final image based on the IMAGE_TYPE specified.
26 FROM ${IMAGE_TYPE} AS final
27 # Redeclare IMAGE_TYPE variable so it can be referenced inside this build

Subscribers

People subscribed via source and target branches