|
| 1 | +# run-aplus-front |
| 2 | + |
| 3 | +A Docker container that runs the A-plus |
| 4 | +Learning Management System exposed to port 8000. |
| 5 | + |
| 6 | +Note that the A-plus front service alone does not provide |
| 7 | +capability to implement or host learning material or exercises. |
| 8 | +The front connects to different material or assessment services |
| 9 | +that provide interactive content to learners. A common |
| 10 | +counterpart for content services is the |
| 11 | +[A-plus MOOC-grader](https://hub.docker.com/r/apluslms/run-mooc-grader/). |
| 12 | + |
| 13 | +See into the [A-plus manual course](https://github.com/apluslms/aplus-manual) |
| 14 | +that includes a Docker compose configuration to develop and test course content. |
| 15 | + |
| 16 | +## Usage |
| 17 | + |
| 18 | +A-plus is installed in `/srv/aplus`. |
| 19 | +You can mount development version of the source code to `/src/aplus`. |
| 20 | +The container will then copy it to `/srv/aplus` and compile |
| 21 | +the translation file (django.mo). If you mount directly to |
| 22 | +`/srv/aplus`, you need to manually compile the translation file beforehand, |
| 23 | +but on the other hand, Django can reload the code and restart the server |
| 24 | +without restarting the whole container when you edit the source code files. |
| 25 | + |
| 26 | +You can mount development version of the A+ source code on top of that, if you wish. |
| 27 | + |
| 28 | +Location `/data` is a volume and contains submission files, database and secret key. |
| 29 | +It is world writable, so you can run this container as normal user. |
| 30 | + |
| 31 | +The environment variable `APLUS_ENABLE_DJANGO_DEBUG_TOOLBAR` can be set to `'true'` or `'false'` in `docker-compose.yml`. |
| 32 | +It controls the Django Debug Toolbar, which provides useful debug data in a set panels on the right side of the web pages. |
| 33 | +The debug data comes from the a-plus code, not from course contents or exercise graders. |
| 34 | +Therefore, the toolbar is useful to A+ platform developers. |
| 35 | +If there is a reason to disable the toolbar (e.g., in some cases, it might slow down the performance), |
| 36 | +then it is easy to switch it on or off with the environment variable. |
| 37 | +By default when the env variable is not defined, the toolbar is disabled. |
| 38 | + |
| 39 | +Partial example of `docker-compose.yml` (volumes are optional of course): |
| 40 | + |
| 41 | +```yaml |
| 42 | +services: |
| 43 | + plus: |
| 44 | + image: apluslms/run-aplus-front |
| 45 | + environment: |
| 46 | + APLUS_ENABLE_DJANGO_DEBUG_TOOLBAR: 'true' |
| 47 | + volumes: |
| 48 | + # named persistent volume (until removed) |
| 49 | + # - data:/data |
| 50 | + # mount development version to /src/aplus |
| 51 | + # - /home/user/a-plus/:/src/aplus/:ro |
| 52 | + # or to /srv/aplus |
| 53 | + # - /home/user/a-plus/:/srv/aplus/:ro |
| 54 | + ports: |
| 55 | + - "8000:8000" |
| 56 | + depends_on: |
| 57 | + - grader |
| 58 | +volumes: |
| 59 | + data: |
| 60 | +``` |
0 commit comments