Skip to content

Commit

Permalink
Add adminer to gitpod
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed May 7, 2024
1 parent ccfd87f commit 4dc8128
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitpod/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,18 @@ if [ -n "$DATAFILE" ];
then
wget -O moodle/admin/tool/generator/tests/fixtures/gitpod-basic-scenario.feature "${DATAFILE}"
fi

# Install adminer.
if [ -n "$INSTALLADMINER" ];
then
cat << EOF > local.yml
services:
adminer:
image: adminer:latest
restart: always
ports:
- 8080:8080
depends_on:
- "db"
EOF
fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ The Moodle Gitpod template supports the following environment variables:
* `MOODLE_REPOSITORY`. The Moodle repository to be cloned. The value should be URL encoded. If left undefined, the default repository `https://github.com/moodle/moodle.git` is used.
* `MOODLE_BRANCH`. The Moodle branch to be cloned. If left undefined, the default branch `main` is employed.
* `DATAFILE`. When specified, this feature URL initializes the Moodle site with essential data. The value should be URL encoded. The content of this file adheres to the [Behat generators format](https://moodledev.io/general/development/tools/generator#create-a-testing-scenario-using-behat-generators) for creating testing scenarios.
* `INSTALLADMINER`. Add this variable, set to any value, to install [adminer](https://www.adminer.org/).

For a practical demonstration, launch a Gitpod workspace with the 'main' branch patch for [MDL-79912](https://tracker.moodle.org/browse/MDL-79912). Simply open the following URL in your web browser (note that MOODLE_REPOSITORY should be URL encoded). The password for the **admin** user is **test**:

Expand Down

0 comments on commit 4dc8128

Please sign in to comment.