Skip to content
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 Moodle Template #471

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions templates/moodle/assets/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions templates/moodle/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { Output, randomPassword, Services } from "~templates-utils";
import { Input } from "./meta";

export function generate(input: Input): Output {
const services: Services = [];
const databasePassword = randomPassword();

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: "moodle",
source: {
type: "github",
owner: "ulties",
repo: "moodle-docker",
ref: "v4.3.0",
path: "/",
autoDeploy: false,
},
env: [
"MOODLE_URL=https://" + input.moodleDomain,
"MOODLE_SSLPROXY=true",
"MOODLE_DB_TYPE=mysqli",
"MOODLE_DB_HOST=" + input.projectName + "_mysql",
"MOODLE_DB_NAME=" + input.projectName,
"MOODLE_DB_USER=mysql",
"MOODLE_DB_PASSWORD=" + databasePassword,
"MOODLE_DB_PREFIX=mdl_",
].join("\n"),
deploy: {
replicas: 1,
command: null,
zeroDowntime: true,
},
domains: [
{
host: input.moodleDomain,
https: true,
port: 80,
path: "/",
},
],
mounts: [
{
type: "volume",
name: "moodle_data",
mountPath: "/var/www/moodledata",
},
],
},
});

services.push({
type: "mysql",
data: {
projectName: input.projectName,
serviceName: "mysql",
image: "mysql:8",
password: databasePassword,
},
});

return { services };
}

/*

*/
62 changes: 62 additions & 0 deletions templates/moodle/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Moodle
description: Moodle is a learning platform designed to provide educators,
administrators and learners with a single robust, secure and integrated
system to create personalised learning environments.
instructions: null
changeLog:
- date: 2023-11-30
description: first release
links:
- label: Website
url: https://moodle.org/
- label: Documentation
url: https://docs.moodle.org/
- label: Dockerfile
url: https://github.com/ulties/moodle-docker
contributors:
- name: Mark Topper Diderichsen
url: https://github.com/marktopper
schema:
type: object
required:
- projectName
- moodleDomain
properties:
projectName:
type: string
title: Project Name
default: moodle
moodleDomain:
type: string
title: Moodle Domain
default: moodle.example.com
benefits:
- title: Customization and Flexibility
description: Moodle is highly customizable, allowing educators to tailor
the learning environment to meet specific educational needs. Its modular
nature supports the inclusion of plugins for various functionalities,
making it adaptable for different teaching and learning styles.
- title: Collaborative Learning
description: Moodle facilitates collaborative learning through its
interactive tools like forums, wikis, and chats. These features enable
students to work together on projects, share ideas, and discuss course
materials, fostering a community learning environment.
features:
- title: Wide Range of Activity Modules
description: Moodle includes a variety of activity modules such as quizzes,
forums, and databases, which can be used to build rich, interactive courses.
These tools help in assessing student understanding and promoting engagement.
- title: Comprehensive Reporting and Tracking
description: Moodle provides detailed tracking and reporting features that
allow educators to monitor student progress and activity. Teachers can track
course completions, quiz attempts, and other student engagements, which is
vital for evaluating the effectiveness of the course content.
- title: Multilingual Support
description:
Moodle supports multiple languages, making it a suitable platform
for global use. This feature is particularly beneficial for institutions with
a diverse student body or those offering courses in multiple languages.
tags:
- E-Learning
- LMS
- Education