Skip to content

Commit

Permalink
add additional image tag, update README.md, fix: run moodle setup as …
Browse files Browse the repository at this point in the history
…daemon user
  • Loading branch information
Glutamat42 committed Dec 14, 2024
1 parent 80e1f6e commit 793acf5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
images: ${{ env.REGISTRY }}/projektadler/adler-moodle
tags: |
type=raw,value=moodle-${{ matrix.moodle_version }}
type=raw,value=latest-moodle-${{ matrix.moodle_version }}
type=semver,pattern={{version}}-moodle-${{ matrix.moodle_version }}
type=semver,pattern={{major}}.{{minor}}-moodle-${{ matrix.moodle_version }}
type=semver,pattern={{major}}-moodle-${{ matrix.moodle_version }}
Expand Down
23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,33 @@ RUN mv setup.sh.tmp setup.sh
RUN chmod +x setup.sh
```

## Environment variables
## Usage
Do NOT use the `latest` tag. It is not guaranteed to be any specific one of the supported moodle releases and moodle
updates have to be installed manually.

### Environment variables

All variables from the bitnami/moodle image are supported. Additionally, the following environment variables can be set:

### PHP environment variables
#### PHP environment variables

| Variable | required | Description |
|------------------------|----------|--------------------------------------------------------------------------------------------------------------|
| `PHP_OUTPUT_BUFFERING` | no | Controls the output buffering behavior of PHP. Set it to adjust the buffering setting in the `php.ini` file. |

### Moodle user creation variables
#### Moodle user creation variables

| Variable | required | Description |
|--------------------------------------|------------------------------|-------------------------------|
| `DECLARATIVE_SETUP_MANAGER_PASSWORD` | if role `test_users` is used | Password for the manager user |
| `DECLARATIVE_SETUP_STUDENT_PASSWORD` | if role `test_users` is used | Password for the student user |

### Other environment variables
#### Other environment variables

| Variable | required | Description |
|------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------|
| `ADLER_PLAYBOOK_ROLES` | no | roles to be passed to playbook, see [AdLer Playbook](https://github.com/ProjektAdLer/MoodlePlugin-playbook_adler) for a list of roles |

#### Examples

## Updating moodle

Expand All @@ -65,16 +68,6 @@ A possible approach to mitigate this issue might be placing an overlay volume on
this
moodle image. But it is unknown whether this would work and what potential issues might arise from this.

## Docker Build Arguments

When building the Docker image for this project, you can customize the following arguments:

- `MOODLE_VERSION`: Specifies the version of Moodle to be used in the image. The default value is `latest`.

These arguments allow you to control the versions of Moodle and the plugin that are used during the image build process.
You can adjust these values according to your specific
requirements and preferences.

## Install additional languages

1) Install the required system locale by modifying the Dockerfile. You can see which one you need by manually enabling
Expand Down
2 changes: 1 addition & 1 deletion opt/adler/entrypoint_adler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# inject adler update
if ! grep "/opt/adler/setup.sh" /opt/bitnami/scripts/moodle/entrypoint.sh > /dev/null ; then
echo "inject adler update"
sed -i '/^exec "$@".*/i echo "starting adler setup script" && /opt/adler/setup.sh' /opt/bitnami/scripts/moodle/entrypoint.sh
sed -i '/^exec "$@".*/i echo "starting adler setup script" && su daemon -s /bin/bash -c "/opt/adler/setup.sh"' /opt/bitnami/scripts/moodle/entrypoint.sh
fi


Expand Down

0 comments on commit 793acf5

Please sign in to comment.