Code Monkey home page Code Monkey logo

docker-moodle-postgres's Introduction

docker-moodle-postgres

A Dockerfile that installs and runs Moodle from external source with Postgres Database. The PHP code of Moodle is mounted from a host's subdirectory.

All the scripts must be run from the directory containing Dockerfile and docker-compose.yml.

Setup

Requires Docker to be installed and, optionally, Docker-compose as well.

Installation

git clone https://github.com/sarjona/docker-moodle-postgres
cd docker-moodle-postgres
./build-image.sh

Usage

When running locally or for a test deployment, use of localhost is acceptable. To spawn a new instance of Moodle it's necessary to create a folder with the Moodle source and create both container needed. The following script download Moodle from main GIT repository and create both containers (PHP and Postgres).

./start-containers.sh

The start-containers.sh script:

  • If it's first time, it will download last Moodle version from GIT and create both docker containers needed (PHP server and DB).
  • If the containers are created, it will start them.

In both cases, at the end of the execution are showed the instructions to access them. By default:

To access Moodle: http://127.0.0.1:8000
Admin credentials: admin/Abcd1234$

To connect to PostgreSQL: host:port=127.0.0.1:32769, dbuser=moodle, dbpwd=secret
To enter shell in moodle container shell: docker exec -it moodle_33_core-php bash

By default, the script creates a docker with Moodle 3.3. It's possible create a Moodle 3.2 docker with the following callback:

./start-containers.sh moodle32

Caveats

The following aren't included:

  • moodle cronjob (should be called from cron container)
  • log handling. Logs are stored in the default stout (/var/log/apache2/).
  • email (does it even send?)

Credits

This has been adapted from Lorenzo Nicora and Jonathan Hardison Dockerfiles.

docker-moodle-postgres's People

Contributors

sarjona avatar

Watchers

James Cloos avatar  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.