Code Monkey home page Code Monkey logo

moodle-docker-compose's Introduction

moodle-docker-compose

moodle-docker-compose is a the localhost/development version of my moodle website

Features:

  • Tested only on a Linux/Debian host
  • php-fpm 7.2
  • Moodle 3.5
  • mysql:5.7
  • phpmyadmin

Why using moodle on docker?

  • Not having to repeat each operations each migration/upgrade
  • Reuse existing moodle website and customize it a lot
  • Not having to install libraries on host machine
  • Easier moodle upgrade (rebuild image)

Security consideration

Passwords are stored in Docker image in moodle configuration file

This is not considered a good practice, but is the easy way

Usage: Import an existing moodle website

1- Configuration

Creates a ".secrets" file at the root containing MySQL passwords:

MYSQL_PASSWORD=XXYYZZ
MYSQL_ROOT_PASSWORD=XXYYZZ

2- Build

In terminal:

make clean
make install

This will build a docker-compose directory in dist/ from localhost template in src/

3- Run

In terminal:

make docker-up

It does a docker-compose up in dist/

Now you can open http://localhost/info.php to check the php status

4- Restore database

You can use phpmyadmin to import a dump http://localhost/phpmyadmin/

Creates user moodleuser with access granted to database moodle with password MYSQL_PASSWORD that is in .secrets

5- Restore moodledata

Stop docker-compose

Copy existing content of moodledata in the new ./dist/volumes/moodle/moodledata

3- Moodle upgrade

In terminal

make docker-up

Now go to http://localhost/moodle/

moodle-docker-compose's People

Contributors

arialwhite avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.