New moodle container and new src mountoint

root 2021-04-18 11:20:51 +02:00
parent de0c62eac3
commit ed70b768e5
19 changed files with 74 additions and 590 deletions

View File

@ -11,7 +11,7 @@ services:
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ${DATA_FOLDER}/haproxy/certs:/certs:rw
- ${SRC_FOLDER}/haproxy:/certs:rw
networks:
- isard_net
ports:

View File

@ -5,7 +5,7 @@
set -eo pipefail
# Check that the database is available
echo "Waiting for $DB_HOST:$DB_PORT to be ready"
echo "Waiting for $database:$port to be ready"
while ! nc -w 1 $DB_HOST $DB_PORT; do
# Show some progress
echo -n '.';
@ -15,14 +15,12 @@ echo "$database is ready"
# Give it another 3 seconds.
sleep 3;
# Check if the config.php file exists
if [ ! -f /var/www/html/config.php ]; then
echo "Downloading moodle src..."
curl --location $MOODLE_URL | tar xz --strip-components=1 -C /var/www/html/
cp /isinstalled.php /var/www/html/admin/cli/
sh /plugins.sh
chown -R nobody:root /var/www/html
chown nobody:root /var/www/html -R
echo "Generating config.php file..."
ENV_VAR='var' php -d max_input_vars=1000 /var/www/html/admin/cli/install.php \
@ -60,8 +58,8 @@ if php -d max_input_vars=1000 /var/www/html/admin/cli/isinstalled.php ; then
--adminuser=$MOODLE_USERNAME \
--adminpass=$MOODLE_PASSWORD \
--adminemail=$MOODLE_EMAIL \
--fullname=Dockerized_Moodle \
--shortname=moodle \
--fullname=$DOMAIN \
--shortname=$DOMAIN \
--agree-license
echo "Configuring settings..."
@ -89,6 +87,8 @@ else
php -d max_input_vars=1000 /var/www/html/admin/cli/maintenance.php --disable
fi
chown -R nobody:root /var/www/html

41
docker/moodle/03-plugins.sh Executable file
View File

@ -0,0 +1,41 @@
if [ ! -f /var/www/html/config.php ]; then
curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
unzip jitsi.zip -d /var/www/html/mod/
rm jitsi.zip
curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
unzip bbb.zip -d /var/www/html/mod/
rm bbb.zip
#ADD plugins/auth_saml2.zip /var/www/html/
curl --location https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip > auth_saml2.zip
unzip auth_saml2.zip -d /var/www/html/auth/
mv /var/www/html/auth/moodle-auth_saml2-role_map /var/www/html/auth/saml2
rm auth_saml2.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntshare/archive/refs/heads/master.zip > tresipuntshare.zip
unzip tresipuntshare.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntshare-master /var/www/html/mod/tresipuntshare
rm tresipuntshare.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntvideo/archive/refs/heads/master.zip > tresipuntvideo.zip
unzip tresipuntvideo.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntvideo-master /var/www/html/mod/tresipuntvideo
rm tresipuntvideo.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip > tresipuntaudio.zip
unzip tresipuntaudio.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntaudio-master /var/www/html/mod/tresipuntaudio
rm tresipuntaudio.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip > tresipuntaudio.zip
unzip tresipuntaudio.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntaudio-master /var/www/html/mod/tresipuntaudio
rm tresipuntaudio.zip
curl --location https://github.com/3iPunt/moodle_theme_cbe/archive/refs/heads/master.zip > tresipunt_theme_cbe.zip
unzip tresipunt_theme_cbe.zip -d /var/www/html/theme/
mv /var/www/html/theme/moodle_theme_cbe-master /var/www/html/theme/cbe
rm tresipunt_theme_cbe.zip
fi
chown -R nobody:root /var/www/html

View File

@ -1,90 +1,22 @@
FROM php:7-fpm-alpine
RUN docker-php-source extract && \
apk --no-cache add \
php7 \
php7-fpm \
php7-opcache \
php7-pecl-apcu \
php7-mysqli \
php7-pgsql \
php7-json \
php7-openssl \
php7-curl \
php7-zlib \
php7-soap \
php7-xml \
php7-fileinfo \
php7-phar \
php7-intl \
php7-dom \
php7-xmlreader \
php7-ctype \
php7-session \
php7-iconv \
php7-tokenizer \
php7-xmlrpc \
php7-zip \
php7-simplexml \
php7-mbstring \
php7-gd \
nginx \
runit \
curl \
# php7-pdo \
# php7-pdo_pgsql \
# php7-pdo_mysql \
# php7-pdo_sqlite \
# php7-bz2 \
&& docker-php-source delete
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Add application
WORKDIR /var/www/html
# Expose the port nginx is reachable on
EXPOSE 8080
# Let runit start nginx & php-fpm
CMD [ "/bin/docker-entrypoint.sh" ]
# Configure a healthcheck to validate that everything is up&running
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
ENV client_max_body_size=2M \
clear_env=no \
allow_url_fopen=On \
allow_url_include=Off \
display_errors=Off \
file_uploads=On \
max_execution_time=0 \
max_input_time=-1 \
max_input_vars=1000 \
memory_limit=128M \
post_max_size=8M \
upload_max_filesize=2M \
zlib.output_compression=On
ARG ARCH=
#FROM ${ARCH}erseco/alpine-php7-webserver AS base
FROM base-php7
LABEL maintainer="Ernesto Serrano <info@ernesto.es>"
FROM ${ARCH}erseco/alpine-php7-webserver
#USER root
COPY rootfs /
#COPY 02-configure-moodle.sh docker-entrypoint-init.d/02-configure-moodle.sh
#COPY --chown=nobody rootfs/ /
LABEL maintainer="Adapted from: Ernesto Serrano <info@ernesto.es>"
USER root
COPY src/rootfs/ /
COPY 02-configure-moodle.sh /docker-entrypoint-init.d/
COPY 03-plugins.sh /docker-entrypoint-init.d/
COPY src/rootfs/var/www/html/admin/cli/isinstalled.php /
RUN echo "user=nobody" >> /etc/php7/php-fpm.d/www.conf
RUN echo "group=nobody" >> /etc/php7/php-fpm.d/www.conf
# crond needs root, so install dcron and cap package and set the capabilities
# on dcron binary https://github.com/inter169/systs/blob/master/alpine/crond/README.md
RUN apk add --no-cache dcron libcap && \
# chown nobody:nobody /usr/sbin/crond && \
chown nobody:nobody /usr/sbin/crond && \
setcap cap_setgid=ep /usr/sbin/crond
#USER nobody
# Change MOODLE_38_STABLE for new versions
ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz \
LANG=en_US.UTF-8 \
@ -106,7 +38,7 @@ ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz
SMTP_HOST=smtp.gmail.com \
SMTP_PORT=587 \
SMTP_USER=your_email@gmail.com \
SMTP_PASSWORD=your_password \
SMTP_PASSWORD=your_password \
SMTP_PROTOCOL=tls \
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost \
MOODLE_MAIL_PREFIX=[moodle] \
@ -115,31 +47,4 @@ ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz
upload_max_filesize=50M \
max_input_vars=1000
#USER nobody
#RUN curl --location $MOODLE_URL | tar xz --strip-components=1 -C /var/www/html/
#FROM erseco/alpine-moodle
#FROM base
#USER root
#RUN chmod a+rwx -R /var/www/html
#USER nobody
#RUN curl --location https://moodle.org/plugins/download.php/23298/auth_oidc_moodle310_2020110900.zip > auth_oidc.zip
#RUN unzip auth_oidc.zip -d /var/www/html/auth/
#RUN rm auth_oidc.zip
#RUN curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
#RUN unzip jitsi.zip -d /var/www/html/mod/
#RUN rm jitsi.zip
#RUN curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
#RUN unzip bbb.zip -d /var/www/html/mod/
#RUN rm bbb.zip
#ADD plugins/auth_saml2.zip /var/www/html/
#RUN curl --location https://moodle.org/plugins/download.php/20505/auth_saml2_moodle37_2019110701.zip > auth_saml2.zip
#RUN unzip auth_saml2.zip -d /var/www/html/auth/
#RUN rm auth_saml2.zip

View File

@ -1,143 +0,0 @@
ARG ARCH=
FROM ${ARCH}alpine:3.13 as php-fpm
LABEL Maintainer="Ernesto Serrano <info@ernesto.es>" \
Description="Lightweight container with Nginx & PHP-FPM based on Alpine Linux."
# Install packages
RUN apk --no-cache add \
php7 \
php7-fpm \
php7-opcache \
php7-pecl-apcu \
php7-mysqli \
php7-pgsql \
php7-json \
php7-openssl \
php7-curl \
php7-zlib \
php7-soap \
php7-xml \
php7-fileinfo \
php7-phar \
php7-intl \
php7-dom \
php7-xmlreader \
php7-ctype \
php7-session \
php7-iconv \
php7-tokenizer \
php7-xmlrpc \
php7-zip \
php7-simplexml \
php7-mbstring \
php7-gd \
nginx \
runit \
curl \
# php7-pdo \
# php7-pdo_pgsql \
# php7-pdo_mysql \
# php7-pdo_sqlite \
# php7-bz2 \
# Bring in gettext so we can get `envsubst`, then throw
# the rest away. To do this, we need to install `gettext`
# then move `envsubst` out of the way so `gettext` can
# be deleted completely, then move `envsubst` back.
&& apk add --no-cache --virtual .gettext gettext \
&& mv /usr/bin/envsubst /tmp/ \
&& runDeps="$( \
scanelf --needed --nobanner /tmp/envsubst \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --no-cache $runDeps \
&& apk del .gettext \
&& mv /tmp/envsubst /usr/local/bin/ \
# Remove alpine cache
&& rm -rf /var/cache/apk/* \
# Remove default server definition
&& rm /etc/nginx/conf.d/default.conf
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
# && chown -R nobody.nobody /run \
# && chown -R nobody.nobody /var/lib/nginx \
# && chown -R nobody.nobody /var/log/nginx
# Add configuration files
#COPY --chown=nobody rootfs/ /
COPY rootfs-php7/rootfs/ /
# Switch to use a non-root user from here on
#USER nobody
# Add application
WORKDIR /var/www/html
# Expose the port nginx is reachable on
EXPOSE 8080
# Let runit start nginx & php-fpm
CMD [ "/bin/docker-entrypoint.sh" ]
# Configure a healthcheck to validate that everything is up&running
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
ENV client_max_body_size=2M \
clear_env=no \
allow_url_fopen=On \
allow_url_include=Off \
display_errors=Off \
file_uploads=On \
max_execution_time=0 \
max_input_time=-1 \
max_input_vars=1000 \
memory_limit=128M \
post_max_size=8M \
upload_max_filesize=2M \
zlib.output_compression=On
FROM php-fpm as moodle
COPY rootfs/ /
# crond needs root, so install dcron and cap package and set the capabilities
# on dcron binary https://github.com/inter169/systs/blob/master/alpine/crond/README.md
RUN apk add --no-cache dcron libcap && \
chown nobody:nobody /usr/sbin/crond && \
setcap cap_setgid=ep /usr/sbin/crond
# Change MOODLE_38_STABLE for new versions
ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
SITE_URL=http://localhost \
DB_TYPE=pgsql \
DB_HOST=postgres \
DB_PORT=5432 \
DB_NAME=moodle \
DB_USER=moodle \
DB_PASS=moodle \
DB_PREFIX=mdl_ \
SSLPROXY=false \
MOODLE_EMAIL=user@example.com \
MOODLE_LANGUAGE=en \
MOODLE_SITENAME=New-Site \
MOODLE_USERNAME=moodleuser \
MOODLE_PASSWORD=PLEASE_CHANGEME \
SMTP_HOST=smtp.gmail.com \
SMTP_PORT=587 \
SMTP_USER=your_email@gmail.com \
SMTP_PASSWORD=your_password \
SMTP_PROTOCOL=tls \
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost \
MOODLE_MAIL_PREFIX=[moodle] \
client_max_body_size=50M \
post_max_size=50M \
upload_max_filesize=50M \
max_input_vars=1000
FROM moodle as production
COPY plugins.sh /

View File

@ -1,175 +0,0 @@
ARG ARCH=
FROM ${ARCH}alpine:3.13 as base-php7
LABEL Maintainer="Ernesto Serrano <info@ernesto.es>" \
Description="Lightweight container with Nginx & PHP-FPM based on Alpine Linux."
# Install packages
RUN apk --no-cache add \
php7 \
php7-fpm \
php7-opcache \
php7-pecl-apcu \
php7-mysqli \
php7-pgsql \
php7-json \
php7-openssl \
php7-curl \
php7-zlib \
php7-soap \
php7-xml \
php7-fileinfo \
php7-phar \
php7-intl \
php7-dom \
php7-xmlreader \
php7-ctype \
php7-session \
php7-iconv \
php7-tokenizer \
php7-xmlrpc \
php7-zip \
php7-simplexml \
php7-mbstring \
php7-gd \
nginx \
runit \
curl \
# php7-pdo \
# php7-pdo_pgsql \
# php7-pdo_mysql \
# php7-pdo_sqlite \
# php7-bz2 \
# Bring in gettext so we can get `envsubst`, then throw
# the rest away. To do this, we need to install `gettext`
# then move `envsubst` out of the way so `gettext` can
# be deleted completely, then move `envsubst` back.
&& apk add --no-cache --virtual .gettext gettext \
&& mv /usr/bin/envsubst /tmp/ \
&& runDeps="$( \
scanelf --needed --nobanner /tmp/envsubst \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --no-cache $runDeps \
&& apk del .gettext \
&& mv /tmp/envsubst /usr/local/bin/ \
# Remove alpine cache
&& rm -rf /var/cache/apk/* \
# Remove default server definition
&& rm /etc/nginx/conf.d/default.conf
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
# && chown -R nobody.nobody /run \
# && chown -R nobody.nobody /var/lib/nginx \
# && chown -R nobody.nobody /var/log/nginx
# Add configuration files
#COPY --chown=nobody rootfs/ /
COPY rootfs-php7/rootfs/ /
# Switch to use a non-root user from here on
#USER nobody
# Add application
WORKDIR /var/www/html
# Expose the port nginx is reachable on
EXPOSE 8080
# Let runit start nginx & php-fpm
CMD [ "/bin/docker-entrypoint.sh" ]
# Configure a healthcheck to validate that everything is up&running
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
ENV client_max_body_size=2M \
clear_env=no \
allow_url_fopen=On \
allow_url_include=Off \
display_errors=Off \
file_uploads=On \
max_execution_time=0 \
max_input_time=-1 \
max_input_vars=1000 \
memory_limit=128M \
post_max_size=8M \
upload_max_filesize=2M \
zlib.output_compression=On
ARG ARCH=
#FROM ${ARCH}erseco/alpine-php7-webserver AS base
FROM base-php7
LABEL maintainer="Ernesto Serrano <info@ernesto.es>"
#USER root
COPY rootfs /
#COPY 02-configure-moodle.sh docker-entrypoint-init.d/02-configure-moodle.sh
#COPY --chown=nobody rootfs/ /
# crond needs root, so install dcron and cap package and set the capabilities
# on dcron binary https://github.com/inter169/systs/blob/master/alpine/crond/README.md
RUN apk add --no-cache dcron libcap && \
# chown nobody:nobody /usr/sbin/crond && \
setcap cap_setgid=ep /usr/sbin/crond
#USER nobody
# Change MOODLE_38_STABLE for new versions
ENV MOODLE_URL=https://github.com/moodle/moodle/archive/MOODLE_310_STABLE.tar.gz \
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
SITE_URL=http://localhost \
DB_TYPE=pgsql \
DB_HOST=postgres \
DB_PORT=5432 \
DB_NAME=moodle \
DB_USER=moodle \
DB_PASS=moodle \
DB_PREFIX=mdl_ \
SSLPROXY=false \
MOODLE_EMAIL=user@example.com \
MOODLE_LANGUAGE=en \
MOODLE_SITENAME=New-Site \
MOODLE_USERNAME=moodleuser \
MOODLE_PASSWORD=PLEASE_CHANGEME \
SMTP_HOST=smtp.gmail.com \
SMTP_PORT=587 \
SMTP_USER=your_email@gmail.com \
SMTP_PASSWORD=your_password \
SMTP_PROTOCOL=tls \
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost \
MOODLE_MAIL_PREFIX=[moodle] \
client_max_body_size=50M \
post_max_size=50M \
upload_max_filesize=50M \
max_input_vars=1000
#USER nobody
#RUN curl --location $MOODLE_URL | tar xz --strip-components=1 -C /var/www/html/
#FROM erseco/alpine-moodle
#FROM base
#USER root
#RUN chmod a+rwx -R /var/www/html
#USER nobody
#RUN curl --location https://moodle.org/plugins/download.php/23298/auth_oidc_moodle310_2020110900.zip > auth_oidc.zip
#RUN unzip auth_oidc.zip -d /var/www/html/auth/
#RUN rm auth_oidc.zip
#RUN curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
#RUN unzip jitsi.zip -d /var/www/html/mod/
#RUN rm jitsi.zip
#RUN curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
#RUN unzip bbb.zip -d /var/www/html/mod/
#RUN rm bbb.zip
#ADD plugins/auth_saml2.zip /var/www/html/
#RUN curl --location https://moodle.org/plugins/download.php/20505/auth_saml2_moodle37_2019110701.zip > auth_saml2.zip
#RUN unzip auth_saml2.zip -d /var/www/html/auth/
#RUN rm auth_saml2.zip

View File

@ -1,58 +0,0 @@
FROM erseco/alpine-moodle
#USER root
#RUN chown nobody:nobody /var/www/html
#RUN chmod a+rwx -R /var/www/html
#USER nobody
# USER root
# #RUN mkdir /var/www/html
# RUN chown -R nobody:nobody /var/www/html
# #RUN mkdir /var/www/moodledata
# RUN chown -R nobody:nobody /var/www/moodledata
# USER nobody
# COPY rootfs/docker-entrypoint-init.d/02-configure-moodle.sh /docker-entrypoint-init.d/02-configure-moodle.sh
# COPY rootfs/isinstalled.php /
# COPY plugins.sh /
# USER root
#RUN curl --location https://moodle.org/plugins/download.php/23298/auth_oidc_moodle310_2020110900.zip > auth_oidc.zip
#RUN unzip auth_oidc.zip -d /var/www/html/auth/
#RUN rm auth_oidc.zip
RUN curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
RUN unzip jitsi.zip -d /var/www/html/mod/
RUN rm jitsi.zip
RUN curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
RUN unzip bbb.zip -d /var/www/html/mod/
RUN rm bbb.zip
#ADD plugins/auth_saml2.zip /var/www/html/
RUN curl --location https://github.com/isard-vdi/moodle-auth_saml2/archive/refs/heads/role_map.zip > auth_saml2.zip
RUN unzip auth_saml2.zip -d /var/www/html/auth/
RUN mv /var/www/html/auth/moodle-auth_saml2-role_map /var/www/html/auth/saml2
RUN rm auth_saml2.zip
RUN curl --location https://github.com/3iPunt/moodle_mod_tresipuntshare/archive/refs/heads/master.zip > tresipuntshare.zip
RUN unzip tresipuntshare.zip -d /var/www/html/mod/
RUN mv /var/www/html/mod/moodle_mod_tresipuntshare-master /var/www/html/mod/tresipuntshare
RUN rm tresipuntshare.zip
RUN curl --location https://github.com/3iPunt/moodle_mod_tresipuntvideo/archive/refs/heads/master.zip > tresipuntvideo.zip
RUN unzip tresipuntvideo.zip -d /var/www/html/mod/
RUN mv /var/www/html/mod/moodle_mod_tresipuntvideo-master /var/www/html/mod/tresipuntvideo
RUN rm tresipuntvideo.zip
RUN curl --location https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip > tresipuntaudio.zip
RUN unzip tresipuntaudio.zip -d /var/www/html/mod/
RUN mv /var/www/html/mod/moodle_mod_tresipuntaudio-master /var/www/html/mod/tresipuntaudio
RUN rm tresipuntaudio.zip
RUN curl --location https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip > tresipuntaudio.zip
RUN unzip tresipuntaudio.zip -d /var/www/html/mod/
RUN mv /var/www/html/mod/moodle_mod_tresipuntaudio-master /var/www/html/mod/tresipuntaudio
RUN rm tresipuntaudio.zip
RUN curl --location https://github.com/3iPunt/moodle_theme_cbe/archive/refs/heads/master.zip > tresipunt_theme_cbe.zip
RUN unzip tresipunt_theme_cbe.zip -d /var/www/html/mod/
RUN mv /var/www/html/mod/moodle_theme_cbe-master /var/www/html/theme/cbe
RUN rm tresipunt_theme_cbe.zip

View File

@ -1,5 +0,0 @@
# Moodle
- BigBlueButton: Auto-configure first time
- Jitsi: Auto-configure first time
- Saml2 Connect: Activate & auto-configure first time

View File

@ -1,18 +1,16 @@
version: '3.7'
services:
isard-apps-moodle:
#image: erseco/alpine-moodle
build:
context: ${BUILD_ROOT_PATH}/docker/moodle
dockerfile: Dockerfile.test
dockerfile: Dockerfile
container_name: isard-apps-moodle
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
#- ${DATA_FOLDER}/moodle:/var/www:rw
#- ${DATA_FOLDER}/moodle/data:/var/www/moodledata:rw
#- ${DATA_FOLDER}/moodle/html:/var/www/html:rw
- moodledata:/var/www/moodledata
- ${DATA_FOLDER}/moodle:/var/www/moodledata:rw
- ${SRC_FOLDER}/moodle:/var/www/html:rw
#- moodledata:/var/www/moodledata
depends_on:
- isard-apps-postgresql
environment:
@ -42,5 +40,5 @@ services:
networks:
- isard_net
volumes:
moodledata: null
# volumes:
# moodledata: null

View File

@ -1,36 +0,0 @@
git clone https://github.com/isard-vdi/moodle-auth_saml2.git /var/www/html/auth/saml2
curl --location https://moodle.org/plugins/download.php/23360/mod_jitsi_moodle310_2021020300.zip > jitsi.zip
unzip jitsi.zip -d /var/www/html/mod/
rm jitsi.zip
curl --location https://moodle.org/plugins/download.php/23294/mod_bigbluebuttonbn_moodle310_2019101004.zip > bbb.zip
unzip bbb.zip -d /var/www/html/mod/
rm bbb.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntshare/archive/refs/heads/master.zip > tresipuntshare.zip
unzip tresipuntshare.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntshare-master /var/www/html/mod/tresipuntshare
rm tresipuntshare.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntvideo/archive/refs/heads/master.zip > tresipuntvideo.zip
unzip tresipuntvideo.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntvideo-master /var/www/html/mod/tresipuntvideo
rm tresipuntvideo.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip > tresipuntaudio.zip
unzip tresipuntaudio.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntaudio-master /var/www/html/mod/tresipuntaudio
rm tresipuntaudio.zip
curl --location https://github.com/3iPunt/moodle_mod_tresipuntaudio/archive/refs/heads/master.zip > tresipuntaudio.zip
unzip tresipuntaudio.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_mod_tresipuntaudio-master /var/www/html/mod/tresipuntaudio
rm tresipuntaudio.zip
curl --location https://github.com/3iPunt/moodle_theme_cbe/archive/refs/heads/master.zip > tresipunt_theme_cbe.zip
unzip tresipunt_theme_cbe.zip -d /var/www/html/mod/
mv /var/www/html/mod/moodle_theme_cbe-master /var/www/html/theme/cbe
rm tresipunt_theme_cbe.zip

Binary file not shown.

View File

@ -1,2 +0,0 @@
* * * * * /usr/bin/php /var/www/html/admin/cli/cron.php > /dev/null

View File

@ -1,5 +0,0 @@
#!/bin/sh
# pipe stderr to stdout and run cron
exec 2>&1
exec /usr/sbin/crond -f

View File

@ -1,13 +0,0 @@
<?php
define('CLI_SCRIPT', true);
// extra execution prevention - we can not just require config.php here
if (isset($_SERVER['REMOTE_ADDR'])) {
exit(1);
}
// Nothing to do if config.php exists
$configfile = __DIR__.'/../../config.php';
require($configfile);
if ($DB->get_tables() ) {
// If tables exists, a previous instalation is found, so exit with error
exit(2);
}

View File

@ -1,23 +0,0 @@
LANG=en_US.UTF-8
LANGUAGE=en_US:en
SITE_URL=http://localhost
DB_TYPE=pgsql
DB_HOST=postgres
DB_PORT=5432
DB_NAME=moodle
DB_USER=moodle
DB_PASS=moodle
DB_PREFIX=mdl_
SSLPROXY=false
MOODLE_EMAIL=user@example.com
MOODLE_LANGUAGE=en
MOODLE_SITENAME=New-Site
MOODLE_USERNAME=moodleuser
MOODLE_PASSWORD=PLEASE_CHANGEME
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_password \
SMTP_PROTOCOL=tls
MOODLE_MAIL_NOREPLY_ADDRESS=noreply@localhost
MOODLE_MAIL_PREFIX=[moodle]

View File

@ -12,8 +12,8 @@ services:
depends_on:
- isard-apps-postgresql
volumes:
- ${DATA_FOLDER}/nextcloud/html:/var/www/html
- ${DATA_FOLDER}/nextcloud/data:/var/www/html/data
- ${SRC_FOLDER}/nextcloud:/var/www/html
- ${DATA_FOLDER}/nextcloud:/var/www/html/data
#- ${BUILD_ROOT_PATH}/docker/nextcloud/custom_apps:/var/www/html/custom_apps
- ${BUILD_ROOT_PATH}/docker/nextcloud/themes:/var/www/html/themes
environment:
@ -39,7 +39,7 @@ services:
- isard-apps-nextcloud-app
volumes:
- ${BUILD_ROOT_PATH}/docker/nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
- ${DATA_FOLDER}/nextcloud/html:/var/www/html:ro
- ${SRC_FOLDER}/nextcloud:/var/www/html:ro
- ${BUILD_ROOT_PATH}/docker/nextcloud/themes:/var/www/html/themes
networks:
- isard_net

View File

@ -7,10 +7,11 @@ services:
# - ${IP}:80:80 # change ip if required
volumes:
- ${BUILD_ROOT_PATH}/docker/wordpress/src/config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
- ${DATA_FOLDER}/wordpress/html:/var/www/html # Full wordpress project
- ${SRC_FOLDER}/wordpress:/var/www/html # Full wordpress project
- ${BUILD_ROOT_PATH}/docker/wordpress/plugins/saml/onelogin-saml-sso:/var/www/html/wp-content/plugins/
- ${BUILD_ROOT_PATH}/docker/wordpress/.htaccess:/var/www/html/.htaccess:ro
- ${BUILD_ROOT_PATH}/docker/wordpress/multisite.sh:/multisite.sh:ro
- ${DATA_FOLDER}/wordpress:/var/www/html/wp-content/uploads
#- ${BUILD_ROOT_PATH}/docker/wordpress/plugins/miniorange-saml-20-single-sign-on/:/var/www/html/wp-content/plugins/miniorange-saml-20-single-sign-on
#- ./plugin-name/trunk/:/var/www/html/wp-content/plugins/plugin-name # Plugin development
#- ./theme-name/trunk/:/var/www/html/wp-content/themes/theme-name # Theme development
@ -32,9 +33,6 @@ services:
container_name: isard-apps-wordpress-cli
volumes_from:
- isard-apps-wordpress
# volumes:
# #- ${BUILD_ROOT_PATH}/docker/wordpress/src/config/php.conf.ini:/usr/local/etc/php/conf.d/conf.ini
# - ${DATA_FOLDER}/wordpress/html:/var/www/html
command: >
bash -c 'wp core install --path="/var/www/html" --url=wp.${DOMAIN} --title="Digital Democratic pages" --admin_user=${WORDPRESS_ADMIN_USER} --admin_password=${WORDPRESS_ADMIN_PASSWORD} --admin_email=foo@bar.com
&& wp core multisite-convert'

View File

@ -6,6 +6,8 @@ LETSENCRYPT_EMAIL=
DB_FOLDER=/opt/isard-apps/db
DATA_FOLDER=/opt/isard-apps/data
SRC_FOLDER=/opt/isard-apps/html
LANG=es_ES.UTF-8
LANGUAGE=es_ES:ca