docker-compose.yml template for deploying Learn-OCaml in a VM.
Warning: this configuration is still experimental, in particular the specified version of the learn-ocaml image (version 0.13+git) has not yet been released and contains the following bug: ocaml-sf/learn-ocaml#362 (comment).
Also, some environment variables contained in this configuration may later be renamed (e.g. to prepend some
LEARNOCAML_
prefix).So for the time being, for deploying in prod, you might want to use
ocaml-sf/learn-ocaml:0.12
and/or follow the instructions gathered in the upstream repo
This configuration template combines several Docker containers to
deploy a Learn-OCaml
instance (version 0.13+), served in HTTPS, able to send
e-mails for account confirmation and password changes (assuming the
use_passwd
option has been enabled), and communicating with a
Moodle server (hosted apart, e.g. in your university) using the
LTI protocol, allowing one to sign-up and sign-in very easily
(assuming both use_moodle
and use_passwd
options have been
enabled).
- Install
docker
(see e.g. that page of docker-coq/wiki) - Install
docker-compose
(see official doc) - Clone this repository using
git
. - Edit the following files:
- .env
- root-url.env
- reply-to.env
- smtp.env (and create a text file
./secrets/smtp_password
)
- Run
docker-compose config
to check the configuration values. - Run
docker-compose up
to start the server a first time. - Check that the application is properly served using HTTPS.
- Run
docker-compose stop
(ordocker-compose down
). - Uncomment line
STAGE: 'production'
in file docker-compose.yml. - Run
docker-compose up -d
to restart the server (-d
= in background).