Dockerizing our services

Summertime is here, which means that we have some time to update our electronic services and prepare them for the next academic year. The most significant task was to eliminate the poor performing VPSs and migrate self-hosted services to a Docker-based system on more powerful servers.

Overview of Services

  • – This project hosts our online lab documents and guides for our blended or fully online courses using reStructuredText (RTS) markdown. RTS improves the build cycle to create elearning content using HTML.
  • – Moodle is the LMS that we are currently using as the gateway to our courses. We don’t like the pedagogical features because they are outdated and it doesn’t offer the flexibility that modern LMSs uses, such as Canvas or Open edX. However, it provides an easy option for institutions to start developing some online content, and it has a free mobile application. Mostly, we develop courses in Google Drive and then link to it from Moodle.
  • – We reinstalled this platform to provide additional learning opportunities for our flipped classroom courses. Open edX can highlight the text in a video transcript instead of using subtitles or captions. It provides a better learning experience.

The Work

Services, such as Traefik, and the plethora of docker configs in Github make this work easier. For example, the kind folks at released and continue to maintain a Docker version of Open edX. Kudos to them! One significant benefit of using Docker is that we can back up the data to another VPS and then restore it with minimal effort. It creates a clean snapshot of the system as a whole, which eliminates the needs to backup system components independently. Last year, the Moodle database became corrupted after trying to import a section of course. This was not a welcoming message! There were existing problems in the database, which required manually editing the SQL file to correct the issues before the database restore successfully. Docker won’t fix application bugs, but it will make backing up and restoring the services more manageable.

WordPress and static HTML content were easy to migrate because there are well-maintained builds that follow Docker best practices. Moodle was more challenging, which was surprising considering that it is a standard PHP/MySQL application that uses a typical AMP hosting stack (web server, database, and PHP). Even the Bitnami Moodle docker-compose solution did not work because of an incorrect database configuration. We took one look at Moodle’s own Docker-based implementation and decided to look elsewhere. It seemed non-standard and too messy. For example, the first step requires command bin/moodle-docker-compose up -d and then you have to wait before executing bin/moodle-docker-wait-for-db. Seriously? They have their reasons for not maintaining a single docker-compose file with a pre-built Moodle image and then the companion images. After looking at other builds and testing a few, we ended up creating a custom image based on the work done by user liyali to include the PHP Redis module. His project’s Dockerfile and docker-compose.yml files are straight forward and easy to modify. We are much obliged for his work.

What’s Left

We have been trying without success to get BigBlueButton installed using Docker. However, their Docker files are not ready for production usage and do not include pertinent features that are available using the stand-alone installation procedure. So, we are deciding whether or not to mangle the host VPS and install it directly. But, why not? If all other services are Dockerized, then one application can run on the host machine without interference. It is also easy to wipe the server and load the Docker data from backup.

After adding a web-conferencing software to our portfolio, we will have a solid suite of tools to assist our elearning efforts.

Docker flickr photo by Linux Screenshots shared under a Creative Commons (CC BY 2.0) license