-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Moodle/LTI and email/password-based authentication #362
Open
erikmd
wants to merge
163
commits into
ocaml-sf:master
Choose a base branch
from
pfitaxel:oauth-moodle
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
163 commits
Select commit
Hold shift + click to select a range
2a51fc9
lti: use a form to properly send the token
agrn 185fec8
CSRF
agrn 68da792
learnocaml_server: add a mechanism to redirect to another page
agrn 0ad4060
/launch: let the server fill the form in launch.html itself
agrn b4a144a
learnocaml_index_main: read the token in the cookies if it is set
agrn 759c60d
server: generate an HMAC to validate a first login with LTI
agrn 6b9fef3
launch.html: does not request credentials if a user is already authen…
agrn f7c25ea
launch: add a way to create a new user during an LTI launch
agrn dabe34f
app: change the login dialog
agrn 140eb95
token_index: add oauth index module
agrn c504f6c
token_index: add oauth validation code
agrn fd5058d
app: add an interface to link a moodle account to a learn-ocaml account
agrn 86b5c52
learnocaml_data: add configs options to enable/disable LTI and passwords
agrn 82f6dc5
token_index: add UserIndex module
agrn a49e606
API: add endpoints to register with a nick/password pair
agrn 4683f42
Add forms to register and login with a nick/password pair
agrn a7b9720
index.html: add a "nickname" field in the register form
agrn 43d8b68
learnocaml_index_main: properly logout when connected with LTI
agrn 552946d
lti: setup new forms to login with a login/password pair
agrn e8c06ce
server: implement direct LTI login, email/password login
agrn 275ef9c
server: add an endpoint to check if a given token can be used for login
agrn fbc8666
learnocaml_index_main: don't show the token if it can't be used to login
agrn 6acc3b6
learnocaml_main: generate and print the OAuth token
agrn 3fb8acd
token_index: various cleanups related to Cryptokit
agrn 0d61ddd
Reinstate the token register form when `use_passwd' is disabled
agrn 3654a26
learnocaml_client: add a command to authenticate with a password
agrn 8758049
fix: Add missing deps
erikmd 628c55d
feat: Add learnocaml_sendmail.mli
erikmd 8607024
learnocaml_index_main: don't crash if `can_show_token' is not stored
agrn c30efab
lwt_utils: add a `is_directory' function
agrn 64397d4
token_index: move index files into a subdirectory (`data')
agrn 1ce9aed
token_index: add a `verify_email' column in the user index
agrn 5c8218a
token_index: add a new index to store password resets and email changes
agrn 72a1408
feature: send an email to validate the address when registering
agrn 54a14da
feat: send an email when clicking on the "forgot your password?" link
agrn 914c649
feature: add a form to reset a password
agrn 4f65b5f
server: add an enpoint to initiate a password change from a token
agrn 4ea449e
server: add an endpoint to initiate an email address change
agrn 341f3b6
learnocaml_index_main: add buttons and forms to change email and pass…
agrn a6de979
fix: Add gmp (alpine dependency) for cryptokit
erikmd 27bd23d
feature: add a form to upgrade a token to an account
agrn 34a2e3c
server: advertise the `use_passwd' and `use_moodle' options when star…
agrn ccb6e64
Add a clean dialog box to indicate that an address has been confirmed
agrn cee8896
feature: validate consent checkboxes
agrn e34f784
Add a text to clarify the secret on both register forms
agrn 5b09899
server: remove references to "http://localhost:8080"
agrn 731b361
po: update french translations
agrn 630d7ed
doc: first draft for the password and LTI modes
agrn a219669
learnocaml_index_main: allow user to cancel the change email dialog
agrn d622ef6
feat: Add support for sendmail
erikmd 48485ab
feat: Add docker-compose.dev.yml file to test the sendmail feature
erikmd 2847c36
Add token's indexation
Aleridia 23fc260
Token idexation completed
Aleridia 447642a
Change interface's name
Aleridia 7061166
Change token.json's location
Aleridia 79fb950
Minor changes
Aleridia f375e0a
Update PR
Aleridia a98351b
chore: Ignore learn-ocaml-client.install
erikmd 331072b
Change files due to PR in ocaml-sf
Aleridia 3d750ec
refactor: Token_index
erikmd 0e2a77a
token_index: rewrite to use Ezjsonm instead of Yojson
agrn fee06ee
token_index: rewrite using modules
agrn 7b899f1
token_index: add moodle index module
agrn 896b609
Set ALWAYS_ADD_MISSING_HEADERS := yes
erikmd 1131d59
docs: Add hyperlink to docker-compose.yml template
erikmd adc9729
refactor: Rename file to docker-compose.yml
erikmd 474223f
feat: Add Moodle containers in dev docker-compose.yml
erikmd 86bb1b0
feat: Add nickname in emails openings & Refactor Learnocaml_sendmail
erikmd e3d4a25
feat: Switch to HTML5 emails (Content-Type: multipart/alternative)
erikmd df97f04
refactor: s/Format/Printf/ & Improve log
erikmd c902598
feat: Display the (new) email address on {password, email}-change
erikmd eb1f669
fix: Make strings uniform: s/email/e-mail/
erikmd 5d531a5
docs: Rename some labels
erikmd f4d0a9d
feat: Make the upgrade-button more visible
erikmd 0296f6c
fix: Make email validation check more strict and uniform
erikmd 8103091
refactor: Uniformize message prefix in log
erikmd fbf2d95
refactor: Split BaseUserIndex.upgrade in two functions
erikmd b3a5e45
fix(low-level module BaseUserIndex): Document/Check email invariants
erikmd 67d8785
refactor(token_index.ml): s/name/email/ for readability
erikmd 1ab9a05
fix(Api.Upgrade): check (at high-level) if E-mail already used
erikmd c52678e
fix: check email length
erikmd 9fba3fc
fix: Avoid error if "/sync" does not exist
erikmd 8f30481
fix: Avoid "TOKEN NOT FOUND" error
erikmd 83ee3b7
fix: Make messages uniform for email-based login and password reset
erikmd abe19d3
refactor(index.html): Move "login-returning" before "login-new"
erikmd d2659bb
refactor(_main.ml): Change two strings
erikmd eea254f
fix: Add check_email_ml test
erikmd 966f168
api: don't return the token of a newly created account
agrn ecdc59f
learnocaml_common: hide the dialog box first, then call the callback
agrn efeb108
index_main: the token cookie has priority over the local storage
agrn c6cddda
index.html: Uniformize type="email", type="password" & "Nickname" inputs
erikmd 82e9d68
index_main: make reset_password use check_email_js before calling server
erikmd 5f615dd
fix(MoodleIndex): Add a colon to avoid any potentiel clash
erikmd 0052474
lti-main: Refactor /launch page
erikmd 55b2ea1
docs: s/OAuth token/LTI shared secret/
erikmd 3a6cdab
token_index: reset password operations older than 4 hours are invalid
agrn b58b0f5
server: revoke reset password operations older than 1 month
agrn 4c36a99
server_config.json: allow bool values to be specified with strings
agrn 2f3aea3
config: add an `enableMoodle' value to `learnocaml_config'
agrn b5b9fad
index: change the message when trying to login with an upgraded token
agrn 7224bd5
translations/fr.po: update translations
agrn 1166e31
feat: Add simple password strength evaluation
erikmd 46505b0
fix(token_index.ml): Simplify & Fix the expiration check
erikmd 562ae5e
[learnocaml_sendmail.ml] Mention that the reset-password link expires
erikmd 831001a
fix: Check password strength at server side as well
erikmd b1422b7
fix: Update translations/fr.po
erikmd 0492d7a
fix: fr.po & spacing issue
erikmd d942587
fix: translation bug; s/Upgrade account/Setup a password/
erikmd fd520f1
refactor: s/token/account/
erikmd 94d15b0
docs: further document the semantics of user.json
erikmd 3aeb65b
feat(token_index.ml): Add some simple, future-proof file-format versi…
erikmd 921d100
feat: Make the need for email confirmation (and error) more explicit
erikmd 98267b4
refactor: Improve validation message
erikmd 08137be
fix: run the user-already-exists check after the secret passphrase check
erikmd 87622c8
refactor: Always display the "Show token" button
erikmd d6c5cc7
feat: fully implement the "Show login" dialog
erikmd d785f20
refactor(learnocaml_api.ml): Simplify response_codec/Get_emails
erikmd a1ed4d7
feat: make it possible to reuse a legacy-token account from lti.html
erikmd 4ee7eca
fix: one translation
erikmd 69ac357
feat: Add text advertising Moodle login if it is enabled
erikmd 48fb42b
feat: Resend confirmation email on passwd_reset if unconfirmed email
erikmd 6f33943
feat(index-main): Make login-connect-button check email syntax first
erikmd d09037e
refactor(learnocaml_common.mli): Expose box_button & close_button
erikmd 8f235f4
feat(learnocaml_validate_main.ml): Redirect when closing confim dialog
erikmd 37a3e66
refactor(learnocaml_validate_main.ml): Define and Use cb_alert
erikmd 2a02b6a
feat(index-main): Do Manip.focus, relying on cb_alert
erikmd a04c74d
feat(index-main): Reload the page when registered
erikmd 83024c7
fix(index.html): Set autocomplete="off" for the checkbox
erikmd 08929e7
feat: Allow the user to abort a pending e-mail change
erikmd 41309e8
fix: learnocaml_index_main.ml
erikmd 44bfe9e
fix: Learnocaml_local_storage.(can_show_token)
erikmd 00bf2b6
fix(index-main): upgrade-button
erikmd e06b380
fix(TokenIndex): Ensure add_token doesn't introduce duplicates
erikmd 70235d1
fix(Launch_direct): don't create duplicate user items
erikmd edbb510
refactor(token_index.ml): Replace failwith with printf-then-failwith
erikmd e362d85
fix: missing dependencies in learn-ocaml-client.opam
erikmd 534103c
fix: Print "LTI shared secret" only at "serve" phase (not "build")
erikmd cf4241c
refactor: Rename one CLI option (s/--root/--root-url/)
erikmd ca0bd13
feat: Add LEARNOCAML_ROOT_URL env var
erikmd d75a57a
fix(learnocaml_server): function get_base_url was broken
erikmd 53b3fd3
fix: strings escaping
erikmd 9d6d357
fix: Api.Create_teacher_token should call Token_index.UserIndex.add
erikmd 93c14dd
refactor(token_index.ml): Improve logging
erikmd ddf6e26
fix: init_teacher_token
erikmd aa9a51b
refactor: Don't say "legacy" if use_passwd = false
erikmd 825c1fc
fix: Api.Can_login
erikmd 55b63d0
refactor(index-main): Improve 1 error message & fr.po
erikmd 59b49e0
fix: docker-compose networks
erikmd dfe64ae
fix(static): path of /icons/tryocaml_loading_*.gif
erikmd 2df35d3
fix(token_index): mutex issue
erikmd f429321
Merge branch 'master' into oauth-moodle
Fixiss ab2f47d
fix: bug introduced by the merge
Fixiss 65bbf46
fix: correct Docker and txt_token_secret
Fixiss 9ec9f9f
fix: Remove unneeded apk packages from learn-ocaml-client image
erikmd 8f8bf7f
docs: Document the long time required by the first run of moodle
erikmd 28cd64b
fix: Moodle/LTI authentication was broken, not using the full URL
erikmd 60bf264
feat: add password confirmation lti + index
Fixiss 55908ab
feat: add password confirmation moodle->define password
Fixiss 0da0be2
fix: secret label
Fixiss 1ecf98c
feat: add confirmation password on moodle account and add module for …
Fixiss 18da153
chore: Add deploy-oauth-moodle.yml to auto-build-and-push preprod images
erikmd ac11ad5
chore: Add push_emacs_client, a conditional deploy job
erikmd 84ce517
Merge remote-tracking branch 'upstream/master' into oauth-moodle-dev
erikmd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Note: remove this file (squash-removing the underlying commit) before merging | ||
name: Push oauth-moodle to DockerHub | ||
on: | ||
push: | ||
branches: | ||
- oauth-moodle | ||
- oauth-moodle-dev | ||
jobs: | ||
push_server: | ||
name: Push learn-ocaml image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Get branch name | ||
run: branch="${{ github.ref }}"; echo "::set-output name=branch::${branch#refs/heads/}" | ||
id: branch | ||
- name: Push to Docker Hub | ||
uses: docker/build-push-action@v1 | ||
with: | ||
always_pull: true | ||
add_git_labels: true | ||
labels: "org.opencontainers.image.version=${{ steps.branch.outputs.branch }}" | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
# repository: ocamlsf/learn-ocaml | ||
repository: pfitaxel/learn-ocaml | ||
tags: ${{ steps.branch.outputs.branch }} | ||
push_client: | ||
name: Push learn-ocaml-client image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Get branch name | ||
run: branch="${{ github.ref }}"; echo "::set-output name=branch::${branch#refs/heads/}" | ||
id: branch | ||
- name: Push to Docker Hub | ||
uses: docker/build-push-action@v1 | ||
with: | ||
always_pull: true | ||
add_git_labels: true | ||
labels: "org.opencontainers.image.version=${{ steps.branch.outputs.branch }}" | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
# repository: ocamlsf/learn-ocaml-client | ||
repository: pfitaxel/learn-ocaml-client | ||
target: client | ||
tags: ${{ steps.branch.outputs.branch }} | ||
push_emacs_client: | ||
name: Push emacs-learn-ocaml-client image to Docker Hub | ||
needs: push_client | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
- name: Get branch name | ||
run: branch="${{ github.ref }}"; echo "::set-output name=branch::${branch#refs/heads/}" | ||
id: branch | ||
- name: Push to Docker Hub | ||
# https://github.com/docker/build-push-action/tree/releases/v1#readme | ||
uses: docker/build-push-action@v1 | ||
with: | ||
path: ci/docker-emacs-learn-ocaml-client | ||
build_args: "base=pfitaxel/learn-ocaml-client,version=${{ steps.branch.outputs.branch }}" | ||
always_pull: true | ||
add_git_labels: true | ||
labels: "org.opencontainers.image.version=${{ steps.branch.outputs.branch }}" | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
# repository: ocamlsf/learn-ocaml | ||
repository: pfitaxel/emacs-learn-ocaml-client | ||
tags: ${{ steps.branch.outputs.branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.emacs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
;;; .emacs --- Emacs conf file -*- coding: utf-8 -*- | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
;; Config de package.el, MELPA et use-package | ||
|
||
(require 'package) | ||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | ||
(package-initialize) | ||
|
||
(unless (package-installed-p 'use-package) | ||
(package-refresh-contents) | ||
(package-install 'use-package)) | ||
(eval-when-compile | ||
(require 'use-package)) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
;; Config de Tuareg, Merlin et Company | ||
|
||
(use-package tuareg | ||
:ensure t | ||
:defer t | ||
:init | ||
(setq tuareg-opam-insinuate t)) | ||
|
||
;; Merlin would require OPAM | ||
; (use-package merlin | ||
; :ensure t | ||
; :hook | ||
; ((tuareg-mode caml-mode) . merlin-mode) | ||
; :config | ||
; (setq merlin-command 'opam)) | ||
; | ||
; (use-package merlin-eldoc | ||
; :ensure t | ||
; :hook | ||
; ((tuareg-mode caml-mode) . merlin-eldoc-setup) | ||
; :bind (:map merlin-mode-map | ||
; ("C-c <C-left>" . merlin-eldoc-jump-to-prev-occurrence) | ||
; ("C-c <C-right>" . merlin-eldoc-jump-to-next-occurrence))) | ||
; | ||
; (use-package company | ||
; :ensure t | ||
; :hook | ||
; ((tuareg-mode caml-mode) . company-mode) | ||
; :config | ||
; (bind-key "<backtab>" 'company-complete)) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
;; Config de Magit | ||
|
||
; (use-package magit | ||
; :ensure t | ||
; :defer t | ||
; :config | ||
; (setq magit-diff-refine-hunk 'all) | ||
; :bind (("C-x g" . magit-status) | ||
; ("C-x M-g" . magit-dispatch-popup))) | ||
; | ||
; (use-package magit-gitflow | ||
; :ensure t | ||
; :after magit | ||
; :config (add-hook 'magit-mode-hook 'turn-on-magit-gitflow)) | ||
; | ||
; ;; Protect against accident pushes to upstream | ||
; (defadvice magit-push-current-to-upstream | ||
; (around my-protect-accidental-magit-push-current-to-upstream) | ||
; "Protect against accidental push to upstream. | ||
; | ||
; Causes `magit-git-push' to ask the user for confirmation first." | ||
; (let ((my-magit-ask-before-push t)) | ||
; ad-do-it)) | ||
; | ||
; (defadvice magit-git-push (around my-protect-accidental-magit-git-push) | ||
; "Maybe ask the user for confirmation before pushing. | ||
; | ||
; Advice to `magit-push-current-to-upstream' triggers this query." | ||
; (if (bound-and-true-p my-magit-ask-before-push) | ||
; ;; Arglist is (BRANCH TARGET ARGS) | ||
; (if (yes-or-no-p (format "Push %s branch upstream to %s? " | ||
; (ad-get-arg 0) (ad-get-arg 1))) | ||
; ad-do-it | ||
; (error "Push to upstream aborted by user")) | ||
; ad-do-it)) | ||
; | ||
; (ad-activate 'magit-push-current-to-upstream) | ||
; (ad-activate 'magit-git-push) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
;; Config générale | ||
|
||
(setq column-number-mode t | ||
line-number-mode t | ||
require-final-newline t) | ||
|
||
;; Marquage des parenthèses | ||
(load-library "paren") | ||
(show-paren-mode 1) | ||
|
||
;; Raccourcis C-c/C-x/C-v/C-z standards | ||
;; au lieu de M-w/C-w/C-y/C-_ par défaut dans GNU Emacs | ||
(cua-mode 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
ARG base=ocamlsf/learn-ocaml-client | ||
ARG version=master | ||
FROM ${base}:${version} | ||
|
||
WORKDIR /home/learn-ocaml | ||
|
||
USER root | ||
|
||
RUN apk add --no-cache \ | ||
curl \ | ||
emacs-nox \ | ||
&& mkdir -p -v bin \ | ||
&& chown -v learn-ocaml:learn-ocaml bin | ||
|
||
ENV PATH /home/learn-ocaml/bin:${PATH} | ||
|
||
ENV LANG C.UTF-8 | ||
# ENV LC_ALL C.UTF-8 | ||
# ENV LANGUAGE en_US:en | ||
|
||
COPY --chown=learn-ocaml:learn-ocaml .emacs .emacs | ||
|
||
USER learn-ocaml | ||
|
||
# Do some automatic Emacs installation/byte-compilation: | ||
RUN emacs --version && emacs --batch -l ${HOME}/.emacs | ||
|
||
ENTRYPOINT [] | ||
CMD ["/bin/sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Note: this file is dev-specific. | ||
# To deploy learn-ocaml, see e.g.: | ||
# https://github.com/pfitaxel/docker-learn-ocaml/blob/master/docker-compose.yml | ||
|
||
# Note: regarding the very first run (sudo docker-compose up --build), | ||
# the setup of the moodle container ("Running Moodle install script") | ||
# may take a long time (up to 18'). | ||
# Do NOT stop the docker-compose app too early, otherwise the database | ||
# would be in a broken state, leading to a systematic error at further | ||
# runs ("learn-ocaml_moodle_1 exited with code 1"). | ||
|
||
version: '3.7' | ||
|
||
services: | ||
learnocaml: | ||
container_name: backend | ||
# image: ocamlsf/learn-ocaml:0.13 | ||
build: . | ||
ports: | ||
- '8080:8080' | ||
environment: | ||
# (ocaml variable) root URL: | ||
LEARNOCAML_BASE_URL: "http://localhost:8080" | ||
# (ocaml variable) <container_name>.<network_name>: | ||
FROM_DOMAIN: "backend.localdomain" | ||
# (alpine msmtp variable) hostname of the SMTP server: | ||
SMTPSERVER: "maildev" | ||
# SMTPSERVER: "postfix" | ||
# (ocaml + alpine msmtp variable) Reply-To = Return-Path: | ||
EMAIL: "[email protected]" | ||
depends_on: | ||
- maildev | ||
# - postfix | ||
volumes: | ||
- ./demo-repository:/repository:ro | ||
- ./sync:/sync | ||
networks: | ||
- learnocaml-net | ||
restart: unless-stopped | ||
|
||
# Only useful for dev | ||
maildev: | ||
image: maildev/maildev | ||
ports: | ||
- "1080:80" | ||
networks: | ||
- learnocaml-net | ||
|
||
# For a prod configuration, see also: | ||
# https://github.com/pfitaxel/docker-learn-ocaml/blob/master/docker-compose.yml | ||
|
||
# BEGIN https://github.com/bitnami/bitnami-docker-moodle/blob/ffa8007ebb0ebc501eeeba62804d10b0efef3673/docker-compose.yml | ||
|
||
mariadb: | ||
image: 'docker.io/bitnami/mariadb:10.3-debian-10' | ||
environment: | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
- MARIADB_USER=bn_moodle | ||
- MARIADB_DATABASE=bitnami_moodle | ||
# - BITNAMI_DEBUG=true | ||
volumes: | ||
- 'mariadb_data:/bitnami/mariadb' | ||
networks: | ||
- moodle-net | ||
moodle: | ||
image: 'docker.io/bitnami/moodle:3-debian-10' | ||
ports: | ||
- '9090:8080' | ||
# - '80:8080' | ||
# - '443:8443' | ||
environment: | ||
- MOODLE_DATABASE_HOST=mariadb | ||
- MOODLE_DATABASE_PORT_NUMBER=3306 | ||
- MOODLE_DATABASE_USER=bn_moodle | ||
- MOODLE_DATABASE_NAME=bitnami_moodle | ||
- ALLOW_EMPTY_PASSWORD=yes | ||
# - BITNAMI_DEBUG=true | ||
volumes: | ||
- 'moodle_data:/bitnami/moodle' | ||
- 'moodledata_data:/bitnami/moodledata' | ||
networks: | ||
- moodle-net | ||
depends_on: | ||
- mariadb | ||
|
||
volumes: | ||
mariadb_data: | ||
driver: local | ||
moodle_data: | ||
driver: local | ||
moodledata_data: | ||
driver: local | ||
|
||
# END https://github.com/bitnami/bitnami-docker-moodle/blob/ffa8007ebb0ebc501eeeba62804d10b0efef3673/docker-compose.yml | ||
# @ https://github.com/bitnami/bitnami-docker-moodle#readme | ||
# @ https://github.com/bitnami/bitnami-docker-moodle#configuration | ||
|
||
networks: | ||
learnocaml-net: | ||
driver: bridge | ||
name: localdomain | ||
moodle-net: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm isn't
ocamlnet
a legacy library ? I am not sure it's much maintained anymore.As far as I can see, it is only used for sending emails, did you consider alternatives ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! It had been added just because the mirage counterpart of this library needed ocaml > 4.08, and we only had 4.05 support at this time. Thanks for reminding this need for an upgrade.