You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.0 KiB
66 lines
2.0 KiB
3 days ago
|
FROM webdevops/php-apache:7.3-alpine
|
||
|
|
||
|
ENV HOME="/"
|
||
|
ENV MOODLE="/var/www/html/moodle"
|
||
|
ENV MOODLE_BRANCH="SABERES_37_STABLE"
|
||
|
ENV DATAROOT="/var/www/html/moodledata"
|
||
|
|
||
|
# Install required packages
|
||
|
RUN apk update && \
|
||
|
apk upgrade && \
|
||
|
apk add vim nano aspell clamav ghostscript git graphviz tzdata \
|
||
|
php-curl php-gd php-intl php-ldap php-mbstring php-pgsql \
|
||
|
php-pspell php-soap php-xml php-xmlrpc php-zip
|
||
|
|
||
|
# Set timezone and language
|
||
|
RUN ln -s /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime && \
|
||
|
echo "America/Sao_Paulo" > /etc/timezone
|
||
|
|
||
|
ENV TZ America/Sao_Paulo
|
||
|
ENV LANG pt.UTF-8
|
||
|
ENV LANGUAGE pt.UTF-8
|
||
|
ENV LC_ALL pt.UTF-8
|
||
|
|
||
|
# Install Moodle core system
|
||
|
RUN mkdir -p ${MOODLE}/ && \
|
||
|
git clone https://github.com/interlegis/moodle.git ${MOODLE}/ \
|
||
|
--branch ${MOODLE_BRANCH} \
|
||
|
--depth 1 \
|
||
|
--single-branch && \
|
||
|
chown -Rf www-data:www-data ${MOODLE}/ && \
|
||
|
chmod -R 755 ${MOODLE}/ && \
|
||
|
find ${MOODLE}/ -type d -exec chmod g+s {} \;
|
||
|
|
||
|
# Ensure dataroot directory is writable
|
||
|
RUN mkdir -p ${DATAROOT} && \
|
||
|
chown -R www-data:www-data ${DATAROOT} && \
|
||
|
chmod -R 777 ${DATAROOT}
|
||
|
|
||
|
# Install config.php
|
||
|
COPY moodle-config.php ${MOODLE}/config.php
|
||
|
|
||
|
# Install Moodle components (blocks, modules, themes, etc)
|
||
|
COPY components.list /tmp/components.list
|
||
|
RUN while IFS=";" read type name url branch; do \
|
||
|
if ! [[ ${type} =~ ^# ]]; then \
|
||
|
git clone --recursive ${url} ${MOODLE}/${type}/${name} \
|
||
|
--branch ${branch} \
|
||
|
--depth 1 \
|
||
|
--single-branch; \
|
||
|
fi; \
|
||
|
done < /tmp/components.list
|
||
|
|
||
|
COPY 00_limits.ini /etc/php/7.3/apache2/conf.d/00_limits.ini
|
||
|
COPY 00_opcache.ini /etc/php/7.3/apache2/conf.d/00_opcache.ini
|
||
|
COPY install.sh /usr/local/bin
|
||
|
COPY run.sh /opt/apache2/run.sh
|
||
|
COPY crontab /etc/cron.d
|
||
|
COPY startcron.sh /usr/local/bin
|
||
|
COPY config.php /var/www/html/moodle/config.php
|
||
|
COPY copies/certificate.php /var/www/html/moodle/mod/certificate/type/ILB_flex/certificate.php
|
||
|
|
||
|
COPY ./01-saberes.conf /opt/docker/etc/httpd/vhost.common.d/
|
||
|
COPY ./10-server.conf /opt/docker/etc/httpd/conf.d/
|
||
|
|
||
|
# COPY ./saberesdb.sqlc /tmp/saberesdb.sqlc
|