-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fa4312a
Showing
7 changed files
with
981 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Gather metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: registry.digitalocean.com/vatsim-containers/moodle | ||
tags: | | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
type=sha | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DigitalOcean Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: registry.digitalocean.com | ||
username: ${{ secrets.DO_REGISTRY_USERNAME }} | ||
password: ${{ secrets.DO_REGISTRY_USERNAME }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM php:8.2-apache-bullseye | ||
|
||
ARG MOODLE_LMS_TAG=v4.2.1 | ||
ARG MOODLE_ATTO_MOREFONTCOLORS_TAG=2021062100 | ||
ARG MOODLE_MOD_CUSTOMCERT_TAG=v4.2.2 | ||
ARG MOODLE_TOOL_FORCEDCACHE_COMMIT=10691f9 | ||
|
||
# Install PHP extensions | ||
RUN set -ex \ | ||
&& apt-get update \ | ||
&& apt-get install --no-install-recommends -y git libfreetype6 libfreetype6-dev libjpeg62-turbo libjpeg62-turbo-dev libpng16-16 libpng-dev libwebp6 libwebp-dev libxml2-dev libxslt1.1 libxslt-dev libzip-dev unzip uuid-dev \ | ||
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ | ||
&& docker-php-ext-configure zip --with-zip \ | ||
&& docker-php-ext-install -j$(nproc) exif gd intl mysqli opcache soap xsl zip \ | ||
&& pecl install apcu-5.1.22 redis-5.3.7 timezonedb-2023.3 uuid-1.2.0 \ | ||
&& docker-php-ext-enable apcu redis timezonedb uuid \ | ||
&& apt-get purge -y --auto-remove git libfreetype6-dev libjpeg62-turbo-dev libpng-dev libwebp-dev libxml2-dev libxslt-dev uuid-dev \ | ||
&& rm -rf /tmp/pear /var/lib/apt/lists/* | ||
|
||
# Install Moodle | ||
RUN set -ex \ | ||
&& curl -L https://github.com/moodle/moodle/archive/refs/tags/${MOODLE_LMS_TAG}.tar.gz | tar -C /var/www/html --strip-components=1 -xz \ | ||
&& mkdir -p /var/www/html/lib/editor/atto/plugins/morefontcolors \ | ||
&& curl -L https://github.com/ndunand/moodle-atto_morefontcolors/archive/refs/tags/${MOODLE_ATTO_MOREFONTCOLORS_TAG}.tar.gz | tar -C /var/www/html/lib/editor/atto/plugins/morefontcolors --strip-components=1 -xz \ | ||
&& mkdir -p /var/www/html/mod/customcert \ | ||
&& curl -L https://github.com/mdjnelson/moodle-mod_customcert/archive/refs/tags/${MOODLE_MOD_CUSTOMCERT_TAG}.tar.gz | tar -C /var/www/html/mod/customcert --strip-components=1 -xz \ | ||
&& mkdir -p /var/www/html/admin/tool/forcedcache \ | ||
&& curl -L https://github.com/catalyst/moodle-tool_forcedcache/archive/${MOODLE_TOOL_FORCEDCACHE_COMMIT}.tar.gz | tar -C /var/www/html/admin/tool/forcedcache --strip-components=1 -xz \ | ||
&& chown -R www-data:www-data /var/www/html | ||
|
||
# Configure PHP/Apache | ||
COPY php.ini /usr/local/etc/php/php.ini | ||
COPY moodle.conf /etc/apache2/sites-available/moodle.conf | ||
RUN set -ex \ | ||
&& a2disconf docker-php other-vhosts-access-log serve-cgi-bin \ | ||
&& a2dissite 000-default \ | ||
&& a2enmod rewrite \ | ||
&& a2ensite moodle | ||
|
||
# Configure Moodle | ||
WORKDIR /var/www/html | ||
COPY config.php /var/www/html/config.php | ||
RUN set -ex \ | ||
&& php admin/cli/alternative_component_cache.php --rebuild | ||
|
||
# CMD and ENTRYPOINT are inherited from the Apache image |
Oops, something went wrong.