diff --git a/build/drupal/10.3/php8.2/apache-bullseye/Simuliidae b/build/drupal/10.3/php8.2/apache-bullseye/Simuliidae index d12164e..4b11029 100644 --- a/build/drupal/10.3/php8.2/apache-bullseye/Simuliidae +++ b/build/drupal/10.3/php8.2/apache-bullseye/Simuliidae @@ -14,13 +14,13 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # change the document root as per https://hub.docker.com/_/php/ # because I want to build my code with composer and this is how I've been doing it ... RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web +ENV APACHE_DOCUMENT_ROOT=/var/www/drupal/web RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf WORKDIR /var/www/drupal @@ -57,7 +57,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -87,7 +87,8 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # add composer, uses (default) version 2 COPY --from=composer:2 /usr/bin/composer /usr/local/bin/ # add additional dependencies for installing civicrm with D9 + composer @@ -99,7 +100,7 @@ RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ apt-get purge -y && apt-get clean RUN npm install -g bower # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release ENV DRUPAL_VERSION 10.3.14 USER drupal:www-data @@ -112,7 +113,7 @@ RUN echo "Building with Drupal version $DRUPAL_VERSION" RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all-dependencies RUN composer update # chown -R drupal:www-data web/sites web/modules web/themes; -FROM admin-build-cms as admin-build-crm +FROM admin-build-cms AS admin-build-crm ENV CIVICRM_VERSION 6.2.0 RUN set -eux; \ composer config extra.enable-patching true; \ @@ -126,11 +127,11 @@ RUN \ composer config --no-plugins allow-plugins.civicrm/composer-downloads-plugin true; \ composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ composer update; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/drupal . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/drupal . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/drupal . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/drupal . diff --git a/build/drupal/10.3/php8.3/apache-bullseye/Simuliidae b/build/drupal/10.3/php8.3/apache-bullseye/Simuliidae index d12164e..4b11029 100644 --- a/build/drupal/10.3/php8.3/apache-bullseye/Simuliidae +++ b/build/drupal/10.3/php8.3/apache-bullseye/Simuliidae @@ -14,13 +14,13 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # change the document root as per https://hub.docker.com/_/php/ # because I want to build my code with composer and this is how I've been doing it ... RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web +ENV APACHE_DOCUMENT_ROOT=/var/www/drupal/web RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf WORKDIR /var/www/drupal @@ -57,7 +57,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -87,7 +87,8 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # add composer, uses (default) version 2 COPY --from=composer:2 /usr/bin/composer /usr/local/bin/ # add additional dependencies for installing civicrm with D9 + composer @@ -99,7 +100,7 @@ RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ apt-get purge -y && apt-get clean RUN npm install -g bower # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release ENV DRUPAL_VERSION 10.3.14 USER drupal:www-data @@ -112,7 +113,7 @@ RUN echo "Building with Drupal version $DRUPAL_VERSION" RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all-dependencies RUN composer update # chown -R drupal:www-data web/sites web/modules web/themes; -FROM admin-build-cms as admin-build-crm +FROM admin-build-cms AS admin-build-crm ENV CIVICRM_VERSION 6.2.0 RUN set -eux; \ composer config extra.enable-patching true; \ @@ -126,11 +127,11 @@ RUN \ composer config --no-plugins allow-plugins.civicrm/composer-downloads-plugin true; \ composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ composer update; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/drupal . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/drupal . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/drupal . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/drupal . diff --git a/build/drupal/10.3/php8.3/apache-bullseye/admin/get-value.sh b/build/drupal/10.3/php8.3/apache-bullseye/admin/get-value.sh new file mode 100644 index 0000000..5080c09 --- /dev/null +++ b/build/drupal/10.3/php8.3/apache-bullseye/admin/get-value.sh @@ -0,0 +1,3 @@ +# get an env settings that is stored as a vsite swarm secret +MATCH="^$1=" +export $(grep $MATCH /run/secrets/vsite | xargs) diff --git a/build/drupal/10.4/php8.3/apache-bullseye/Simuliidae b/build/drupal/10.4/php8.3/apache-bullseye/Simuliidae index 8c7d991..17817be 100644 --- a/build/drupal/10.4/php8.3/apache-bullseye/Simuliidae +++ b/build/drupal/10.4/php8.3/apache-bullseye/Simuliidae @@ -14,13 +14,13 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # change the document root as per https://hub.docker.com/_/php/ # because I want to build my code with composer and this is how I've been doing it ... RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web +ENV APACHE_DOCUMENT_ROOT=/var/www/drupal/web RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf WORKDIR /var/www/drupal @@ -57,7 +57,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -87,7 +87,8 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # add composer, uses (default) version 2 COPY --from=composer:2 /usr/bin/composer /usr/local/bin/ # add additional dependencies for installing civicrm with D9 + composer @@ -99,9 +100,9 @@ RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ apt-get purge -y && apt-get clean RUN npm install -g bower # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release -ENV DRUPAL_VERSION 10.4.9 +ENV DRUPAL_VERSION 10.4.7 USER drupal:www-data RUN set -eux; \ composer create-project --no-interaction --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; @@ -112,8 +113,8 @@ RUN echo "Building with Drupal version $DRUPAL_VERSION" RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all-dependencies RUN composer update # chown -R drupal:www-data web/sites web/modules web/themes; -FROM admin-build-cms as admin-build-crm -ENV CIVICRM_VERSION 6.8.0 +FROM admin-build-cms AS admin-build-crm +ENV CIVICRM_VERSION 6.2.0 RUN set -eux; \ composer config extra.enable-patching true; \ composer config minimum-stability dev; \ @@ -126,11 +127,11 @@ RUN \ composer config --no-plugins allow-plugins.civicrm/composer-downloads-plugin true; \ composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ composer update; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/drupal . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/drupal . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/drupal . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/drupal . diff --git a/build/drupal/10.4/php8.3/apache-bullseye/admin/restic-backup.sh b/build/drupal/10.4/php8.3/apache-bullseye/admin/restic-backup.sh new file mode 100644 index 0000000..191ce8f --- /dev/null +++ b/build/drupal/10.4/php8.3/apache-bullseye/admin/restic-backup.sh @@ -0,0 +1,3 @@ +# use restic to backup the filesystem +# +rsync --exclude files/js --exclude files/css --exclude templates_c -avz /var/www/html/sites/default/ /var/backup/volume/${VSITE}_vsite diff --git a/build/drupal/10.5/php8.3/apache-bullseye/Simuliidae b/build/drupal/10.5/php8.3/apache-bullseye/Simuliidae deleted file mode 100644 index 9748ceb..0000000 --- a/build/drupal/10.5/php8.3/apache-bullseye/Simuliidae +++ /dev/null @@ -1,136 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -# This is used to build extended versions of the drupal image, with support for CiviCRM -# as well as production goodies that are not needed for testing or local/dev. -# Goodies include: -# 1. msmtprc: a way to send mail via the host's mail system -# 2. handling of varnish+hitch proxying by apache -# by default, do local building, but we could build from the blackfly repository when using automated build processes. -ARG REPOSITORY_FROM= -# Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] -ARG VARIANT_TAG= -# Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base -# We create a drupal user to own all the code, using Dries birth year as the uid -RUN useradd -u 1978 -g www-data -ms /bin/bash drupal -# change the document root as per https://hub.docker.com/_/php/ -# because I want to build my code with composer and this is how I've been doing it ... -RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web -RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf -WORKDIR /var/www/drupal -RUN chown drupal:www-data /var/www/drupal -# Add a way to send mail out, assuming the host can do mail at port 25. -# The initialize.sh script sets up an entry in /etc/hosts to make it "easy". -# Use iproute2 to figure my ip route out to the host. -# Also include an ssh client and git as useful binaries for the vhttp image -# e.g. for git checkouts of modules. -RUN apt-get update && apt-get install -y msmtp iproute2 openssh-client git imagemagick && \ - apt-get clean && \ - echo 'sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc -t"' > /usr/local/etc/php/conf.d/mail.ini -COPY msmtprc /etc/msmtprc -ARG imagemagic_config=/etc/ImageMagick-6/policy.xml -RUN if [ -f $imagemagic_config ] ; then \ - sed -i 's///g' $imagemagic_config ; \ - fi -# increase default php limits and other customizations -COPY vhttp.ini /usr/local/etc/php/conf.d/ -# provide some handy apache configuration -COPY vhttp.conf /etc/apache2/conf-available/ -RUN a2enconf vhttp -# the initialize script needs to run after the container has been created. -# as well as setting up "mail" in /etc/hosts, it looks for some site-specific -# apache and robots customization -COPY initialize.sh /usr/local/bin/initialize.sh -RUN chmod u+x /usr/local/bin/initialize.sh -# default entrypoint runs initialize and then default/inherited CMD to start apache -COPY entrypoint.sh /entrypoint.sh -RUN chmod 775 /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] -# inherited default CMD["apache2-foreground"], repeated here for good measure. -CMD ["apache2-foreground"] -# Step 2: build a basic admin service, adding some bits to the vhttp-base -# Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. -# We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal -RUN apt-get update \ - && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ - && apt-get purge -y && \ - sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config && \ - sed -i 's/#LogLevel INFO/LogLevel DEBUG/g' /etc/ssh/sshd_config -# For composer projects, we can just extend $PATH to get access to drush -# No longer using drush launcher -ENV PATH="${PATH}:/var/www/drupal/vendor/bin" -# Also add in a symlink in case someone wants to access it at /usr/local/bin/drush -RUN ln -s /var/www/drupal/vendor/bin/drush /usr/local/bin/drush -# Add this version's collection of admin convenience scripts [these are version specific and evolve!] -COPY admin/*sh /usr/local/bin/ -# Include copy of the cv civicrm command line utility -RUN curl -LsS https://download.civicrm.org/cv/cv.phar -o /usr/local/bin/cv -# make sure all my scripts are executable -RUN chmod ugo+x /usr/local/bin/cv && chmod ugo+x /usr/local/bin/*.sh -# The apache for the container shouldn't actually be functional, it doesn't get invoked, so minimize it's resource use -# in case it's actually started. -COPY admin.conf /etc/apache2/conf-available -RUN a2enconf admin -# We inherit the initialization script and entrypoint from vhttp-base -# But we'll use a new entrypoint and cmd to run sshd -COPY entrypoint-sshd.sh /entrypoint-sshd.sh -RUN chmod 775 /entrypoint-sshd.sh && mkdir -p /var/run/sshd -ENTRYPOINT ["/entrypoint-sshd.sh"] -CMD ["/entrypoint-sshd.sh"] -# setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions -COPY setup.sh /setup.sh -RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base -# add composer, uses (default) version 2 -COPY --from=composer:2 /usr/bin/composer /usr/local/bin/ -# add additional dependencies for installing civicrm with D9 + composer -RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - NODE_MAJOR=18 && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \ - apt-get update && apt-get install -y nodejs && \ - apt-get purge -y && apt-get clean -RUN npm install -g bower -# Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms -# https://www.drupal.org/node/3060/release -ENV DRUPAL_VERSION 10.5.6 -USER drupal:www-data -RUN set -eux; \ - composer create-project --no-interaction --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; -RUN composer config extra.enable-patching true -RUN composer config --no-plugins allow-plugins.cweagans/composer-patches true -RUN composer require --no-update drush/drush:12.x --dev -RUN echo "Building with Drupal version $DRUPAL_VERSION" -RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all-dependencies -RUN composer update -# chown -R drupal:www-data web/sites web/modules web/themes; -FROM admin-build-cms as admin-build-crm -ENV CIVICRM_VERSION 6.8.0 -RUN set -eux; \ - composer config extra.enable-patching true; \ - composer config minimum-stability dev; \ - composer config extra.compile-mode all; -RUN \ - composer require --no-update -W "civicrm/civicrm-core:$CIVICRM_VERSION"; \ - composer require --no-update -W "civicrm/civicrm-packages:$CIVICRM_VERSION"; \ - composer require --no-update -W "civicrm/civicrm-drupal-8:$CIVICRM_VERSION"; \ - composer config --no-plugins allow-plugins.civicrm/civicrm-asset-plugin true; \ - composer config --no-plugins allow-plugins.civicrm/composer-downloads-plugin true; \ - composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ - composer update; -FROM vhttp-base as vhttp-cms -COPY --from=admin-build-cms /var/www/drupal . -FROM vhttp-base as vhttp-crm -COPY --from=admin-build-crm /var/www/drupal . -FROM admin-minimal as admin-cms -COPY --from=admin-build-cms /var/www/drupal . -FROM admin-minimal as admin-crm -COPY --from=admin-build-crm /var/www/drupal . diff --git a/build/drupal/11.0/php8.3/apache-bookworm/Simuliidae b/build/drupal/11.0/php8.3/apache-bookworm/Simuliidae index cb3eba2..a996669 100644 --- a/build/drupal/11.0/php8.3/apache-bookworm/Simuliidae +++ b/build/drupal/11.0/php8.3/apache-bookworm/Simuliidae @@ -14,13 +14,13 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # change the document root as per https://hub.docker.com/_/php/ # because I want to build my code with composer and this is how I've been doing it ... RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web +ENV APACHE_DOCUMENT_ROOT=/var/www/drupal/web RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf WORKDIR /var/www/drupal @@ -57,7 +57,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -87,7 +87,8 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # add composer, uses (default) version 2 COPY --from=composer:2 /usr/bin/composer /usr/local/bin/ # add additional dependencies for installing civicrm with D9 + composer @@ -99,7 +100,7 @@ RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ apt-get purge -y && apt-get clean RUN npm install -g bower # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release ENV DRUPAL_VERSION 11.0.13 USER drupal:www-data @@ -112,7 +113,7 @@ RUN echo "Building with Drupal version $DRUPAL_VERSION" RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all-dependencies RUN composer update # chown -R drupal:www-data web/sites web/modules web/themes; -FROM admin-build-cms as admin-build-crm +FROM admin-build-cms AS admin-build-crm ENV CIVICRM_VERSION 6.2.0 RUN set -eux; \ composer config extra.enable-patching true; \ @@ -126,11 +127,11 @@ RUN \ composer config --no-plugins allow-plugins.civicrm/composer-downloads-plugin true; \ composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ composer update; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/drupal . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/drupal . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/drupal . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/drupal . diff --git a/build/drupal/11.1/php8.3/apache-bookworm/Simuliidae b/build/drupal/11.1/php8.3/apache-bookworm/Simuliidae index edc6888..53df33d 100644 --- a/build/drupal/11.1/php8.3/apache-bookworm/Simuliidae +++ b/build/drupal/11.1/php8.3/apache-bookworm/Simuliidae @@ -14,13 +14,13 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # change the document root as per https://hub.docker.com/_/php/ # because I want to build my code with composer and this is how I've been doing it ... RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web +ENV APACHE_DOCUMENT_ROOT=/var/www/drupal/web RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf WORKDIR /var/www/drupal @@ -57,7 +57,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -87,7 +87,8 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # add composer, uses (default) version 2 COPY --from=composer:2 /usr/bin/composer /usr/local/bin/ # add additional dependencies for installing civicrm with D9 + composer @@ -99,9 +100,9 @@ RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ apt-get purge -y && apt-get clean RUN npm install -g bower # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release -ENV DRUPAL_VERSION 11.1.9 +ENV DRUPAL_VERSION 11.1.7 USER drupal:www-data RUN set -eux; \ composer create-project --no-interaction --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; @@ -112,8 +113,8 @@ RUN echo "Building with Drupal version $DRUPAL_VERSION" RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all-dependencies RUN composer update # chown -R drupal:www-data web/sites web/modules web/themes; -FROM admin-build-cms as admin-build-crm -ENV CIVICRM_VERSION 6.8.0 +FROM admin-build-cms AS admin-build-crm +ENV CIVICRM_VERSION 6.2.0 RUN set -eux; \ composer config extra.enable-patching true; \ composer config minimum-stability dev; \ @@ -126,11 +127,11 @@ RUN \ composer config --no-plugins allow-plugins.civicrm/composer-downloads-plugin true; \ composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ composer update; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/drupal . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/drupal . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/drupal . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/drupal . diff --git a/build/drupal/11.2/php8.3/apache-bookworm/Simuliidae b/build/drupal/11.2/php8.3/apache-bookworm/Simuliidae deleted file mode 100644 index 32af01a..0000000 --- a/build/drupal/11.2/php8.3/apache-bookworm/Simuliidae +++ /dev/null @@ -1,136 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -# This is used to build extended versions of the drupal image, with support for CiviCRM -# as well as production goodies that are not needed for testing or local/dev. -# Goodies include: -# 1. msmtprc: a way to send mail via the host's mail system -# 2. handling of varnish+hitch proxying by apache -# by default, do local building, but we could build from the blackfly repository when using automated build processes. -ARG REPOSITORY_FROM= -# Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] -ARG VARIANT_TAG= -# Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base -# We create a drupal user to own all the code, using Dries birth year as the uid -RUN useradd -u 1978 -g www-data -ms /bin/bash drupal -# change the document root as per https://hub.docker.com/_/php/ -# because I want to build my code with composer and this is how I've been doing it ... -RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web -RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf -RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf -WORKDIR /var/www/drupal -RUN chown drupal:www-data /var/www/drupal -# Add a way to send mail out, assuming the host can do mail at port 25. -# The initialize.sh script sets up an entry in /etc/hosts to make it "easy". -# Use iproute2 to figure my ip route out to the host. -# Also include an ssh client and git as useful binaries for the vhttp image -# e.g. for git checkouts of modules. -RUN apt-get update && apt-get install -y msmtp iproute2 openssh-client git imagemagick && \ - apt-get clean && \ - echo 'sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc -t"' > /usr/local/etc/php/conf.d/mail.ini -COPY msmtprc /etc/msmtprc -ARG imagemagic_config=/etc/ImageMagick-6/policy.xml -RUN if [ -f $imagemagic_config ] ; then \ - sed -i 's///g' $imagemagic_config ; \ - fi -# increase default php limits and other customizations -COPY vhttp.ini /usr/local/etc/php/conf.d/ -# provide some handy apache configuration -COPY vhttp.conf /etc/apache2/conf-available/ -RUN a2enconf vhttp -# the initialize script needs to run after the container has been created. -# as well as setting up "mail" in /etc/hosts, it looks for some site-specific -# apache and robots customization -COPY initialize.sh /usr/local/bin/initialize.sh -RUN chmod u+x /usr/local/bin/initialize.sh -# default entrypoint runs initialize and then default/inherited CMD to start apache -COPY entrypoint.sh /entrypoint.sh -RUN chmod 775 /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] -# inherited default CMD["apache2-foreground"], repeated here for good measure. -CMD ["apache2-foreground"] -# Step 2: build a basic admin service, adding some bits to the vhttp-base -# Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. -# We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal -RUN apt-get update \ - && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ - && apt-get purge -y && \ - sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config && \ - sed -i 's/#LogLevel INFO/LogLevel DEBUG/g' /etc/ssh/sshd_config -# For composer projects, we can just extend $PATH to get access to drush -# No longer using drush launcher -ENV PATH="${PATH}:/var/www/drupal/vendor/bin" -# Also add in a symlink in case someone wants to access it at /usr/local/bin/drush -RUN ln -s /var/www/drupal/vendor/bin/drush /usr/local/bin/drush -# Add this version's collection of admin convenience scripts [these are version specific and evolve!] -COPY admin/*sh /usr/local/bin/ -# Include copy of the cv civicrm command line utility -RUN curl -LsS https://download.civicrm.org/cv/cv.phar -o /usr/local/bin/cv -# make sure all my scripts are executable -RUN chmod ugo+x /usr/local/bin/cv && chmod ugo+x /usr/local/bin/*.sh -# The apache for the container shouldn't actually be functional, it doesn't get invoked, so minimize it's resource use -# in case it's actually started. -COPY admin.conf /etc/apache2/conf-available -RUN a2enconf admin -# We inherit the initialization script and entrypoint from vhttp-base -# But we'll use a new entrypoint and cmd to run sshd -COPY entrypoint-sshd.sh /entrypoint-sshd.sh -RUN chmod 775 /entrypoint-sshd.sh && mkdir -p /var/run/sshd -ENTRYPOINT ["/entrypoint-sshd.sh"] -CMD ["/entrypoint-sshd.sh"] -# setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions -COPY setup.sh /setup.sh -RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base -# add composer, uses (default) version 2 -COPY --from=composer:2 /usr/bin/composer /usr/local/bin/ -# add additional dependencies for installing civicrm with D9 + composer -RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - NODE_MAJOR=18 && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list && \ - apt-get update && apt-get install -y nodejs && \ - apt-get purge -y && apt-get clean -RUN npm install -g bower -# Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms -# https://www.drupal.org/node/3060/release -ENV DRUPAL_VERSION 11.2.8 -USER drupal:www-data -RUN set -eux; \ - composer create-project --no-interaction --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; -RUN composer config extra.enable-patching true -RUN composer config --no-plugins allow-plugins.cweagans/composer-patches true -RUN composer require --no-update drush/drush --dev -RUN echo "Building with Drupal version $DRUPAL_VERSION" -RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all-dependencies -RUN composer update -# chown -R drupal:www-data web/sites web/modules web/themes; -FROM admin-build-cms as admin-build-crm -ENV CIVICRM_VERSION 6.8.0 -RUN set -eux; \ - composer config extra.enable-patching true; \ - composer config minimum-stability dev; \ - composer config extra.compile-mode all; -RUN \ - composer require --no-update -W "civicrm/civicrm-core:$CIVICRM_VERSION"; \ - composer require --no-update -W "civicrm/civicrm-packages:$CIVICRM_VERSION"; \ - composer require --no-update -W "civicrm/civicrm-drupal-8:$CIVICRM_VERSION"; \ - composer config --no-plugins allow-plugins.civicrm/civicrm-asset-plugin true; \ - composer config --no-plugins allow-plugins.civicrm/composer-downloads-plugin true; \ - composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ - composer update; -FROM vhttp-base as vhttp-cms -COPY --from=admin-build-cms /var/www/drupal . -FROM vhttp-base as vhttp-crm -COPY --from=admin-build-crm /var/www/drupal . -FROM admin-minimal as admin-cms -COPY --from=admin-build-cms /var/www/drupal . -FROM admin-minimal as admin-crm -COPY --from=admin-build-crm /var/www/drupal . diff --git a/build/drupal/7/php7.4/apache-bullseye/Simuliidae b/build/drupal/7/php7.4/apache-bullseye/Simuliidae index e5878e1..5e10924 100644 --- a/build/drupal/7/php7.4/apache-bullseye/Simuliidae +++ b/build/drupal/7/php7.4/apache-bullseye/Simuliidae @@ -14,7 +14,7 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # use the default document root inherited from php/apache @@ -51,7 +51,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -79,9 +79,10 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release ENV DRUPAL_VERSION 7.103 ENV DRUPAL_MD5 9330ed0dd9926e82b06afb9cf236d5f6 @@ -91,17 +92,17 @@ RUN set -eux; \ tar -xz --strip-components=1 -f drupal.tar.gz; \ rm drupal.tar.gz; \ chown -R drupal:www-data sites modules themes; -FROM admin-build-cms as admin-build-crm -ENV CIVICRM_VERSION 5.81.2 +FROM admin-build-cms AS admin-build-crm +ENV CIVICRM_VERSION 5.82.0 RUN set -eux; \ cd sites/all/modules; \ curl -L "https://download.civicrm.org/civicrm-${CIVICRM_VERSION}-drupal.tar.gz" | tar xvz; \ chown -R drupal:www-data civicrm; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/html . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/html . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/html . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/html . diff --git a/build/drupal/7/php8.1/apache-bullseye/Simuliidae b/build/drupal/7/php8.1/apache-bullseye/Simuliidae index f4c7e3e..45b0846 100644 --- a/build/drupal/7/php8.1/apache-bullseye/Simuliidae +++ b/build/drupal/7/php8.1/apache-bullseye/Simuliidae @@ -14,7 +14,7 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # use the default document root inherited from php/apache @@ -51,7 +51,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -79,9 +79,10 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release ENV DRUPAL_VERSION 7.103 ENV DRUPAL_MD5 9330ed0dd9926e82b06afb9cf236d5f6 @@ -91,17 +92,17 @@ RUN set -eux; \ tar -xz --strip-components=1 -f drupal.tar.gz; \ rm drupal.tar.gz; \ chown -R drupal:www-data sites modules themes; -FROM admin-build-cms as admin-build-crm -ENV CIVICRM_VERSION 5.81.2 +FROM admin-build-cms AS admin-build-crm +ENV CIVICRM_VERSION 5.82.0 RUN set -eux; \ cd sites/all/modules; \ curl -L "https://download.civicrm.org/civicrm-${CIVICRM_VERSION}-drupal.tar.gz" | tar xvz; \ chown -R drupal:www-data civicrm; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/html . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/html . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/html . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/html . diff --git a/build/drupal/7/php8.2/apache-bullseye/Simuliidae b/build/drupal/7/php8.2/apache-bullseye/Simuliidae index f4c7e3e..45b0846 100644 --- a/build/drupal/7/php8.2/apache-bullseye/Simuliidae +++ b/build/drupal/7/php8.2/apache-bullseye/Simuliidae @@ -14,7 +14,7 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal # use the default document root inherited from php/apache @@ -51,7 +51,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -79,9 +79,10 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release ENV DRUPAL_VERSION 7.103 ENV DRUPAL_MD5 9330ed0dd9926e82b06afb9cf236d5f6 @@ -91,17 +92,17 @@ RUN set -eux; \ tar -xz --strip-components=1 -f drupal.tar.gz; \ rm drupal.tar.gz; \ chown -R drupal:www-data sites modules themes; -FROM admin-build-cms as admin-build-crm -ENV CIVICRM_VERSION 5.81.2 +FROM admin-build-cms AS admin-build-crm +ENV CIVICRM_VERSION 5.82.0 RUN set -eux; \ cd sites/all/modules; \ curl -L "https://download.civicrm.org/civicrm-${CIVICRM_VERSION}-drupal.tar.gz" | tar xvz; \ chown -R drupal:www-data civicrm; -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms COPY --from=admin-build-cms /var/www/html . -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm COPY --from=admin-build-crm /var/www/html . -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms COPY --from=admin-build-cms /var/www/html . -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm COPY --from=admin-build-crm /var/www/html . diff --git a/build/drupal/Simuliidae.template b/build/drupal/Simuliidae.template index 5818965..92e9b89 100644 --- a/build/drupal/Simuliidae.template +++ b/build/drupal/Simuliidae.template @@ -8,7 +8,7 @@ ARG REPOSITORY_FROM= # Requires the VARIANT_TAG argument, which may be either the base or non-base version [??] ARG VARIANT_TAG= # Step 1. build the basic web service, a slightly extended version of the corresonding drupal modified base image. -FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} as vhttp-base +FROM ${REPOSITORY_FROM}drupal:base-${VARIANT_TAG} AS vhttp-base # We create a drupal user to own all the code, using Dries birth year as the uid RUN useradd -u 1978 -g www-data -ms /bin/bash drupal {{ if env.version | startswith("7") then ( -}} @@ -18,7 +18,7 @@ WORKDIR /var/www/html # change the document root as per https://hub.docker.com/_/php/ # because I want to build my code with composer and this is how I've been doing it ... RUN mkdir -p /var/www/drupal -ENV APACHE_DOCUMENT_ROOT /var/www/drupal/web +ENV APACHE_DOCUMENT_ROOT=/var/www/drupal/web RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf WORKDIR /var/www/drupal @@ -56,7 +56,7 @@ CMD ["apache2-foreground"] # Step 2: build a basic admin service, adding some bits to the vhttp-base # Admin runs sshd as it's CMD by default, but can be used to, e.g. do automated setup. # We'll first build admin-minimal that we'll use later as a base for admin-build -FROM vhttp-base as admin-minimal +FROM vhttp-base AS admin-minimal RUN apt-get update \ && apt-get install -y mariadb-client sudo vim less zip unzip netcat-traditional ssh rsync openssh-server \ && apt-get purge -y && \ @@ -96,7 +96,8 @@ CMD ["/entrypoint-sshd.sh"] # setup.sh runs the drupal and civicrm setup scripts and handles some ownership/permissions COPY setup.sh /setup.sh RUN chmod 775 /setup.sh -FROM admin-minimal as admin-base +COPY --from=restic/restic:0.18.0 /usr/bin/restic /usr/bin/ +FROM admin-minimal AS admin-base {{ if env.version | startswith("7") then "" else ( -}} # add composer, uses (default) version 2 COPY --from=composer:{{ .composer.version }} /usr/bin/composer /usr/local/bin/ @@ -110,7 +111,7 @@ RUN apt-get update && apt-get install -y ca-certificates curl gnupg && \ RUN npm install -g bower {{ ) end -}} # Step 3: from the admin-base, add the CMS code, and then copy it over to the vhttp-base as the vhttp-cms -FROM admin-base as admin-build-cms +FROM admin-base AS admin-build-cms # https://www.drupal.org/node/3060/release ENV DRUPAL_VERSION {{ .version }} {{ if env.version | startswith("7") then ( -}} @@ -145,7 +146,7 @@ RUN composer require --no-update drupal/core:${DRUPAL_VERSION} --update-with-all RUN composer update # chown -R drupal:www-data web/sites web/modules web/themes; {{ ) end -}} -FROM admin-build-cms as admin-build-crm +FROM admin-build-cms AS admin-build-crm ENV CIVICRM_VERSION {{ .civicrmVersion }} {{ if env.version | startswith("7") then ( -}} RUN set -eux; \ @@ -166,25 +167,25 @@ RUN \ composer config --no-plugins allow-plugins.civicrm/composer-compile-plugin true; \ composer update; {{ ) end -}} -FROM vhttp-base as vhttp-cms +FROM vhttp-base AS vhttp-cms {{ if env.version | startswith("7") then ( -}} COPY --from=admin-build-cms /var/www/html . {{ ) else ( -}} COPY --from=admin-build-cms /var/www/drupal . {{ ) end -}} -FROM vhttp-base as vhttp-crm +FROM vhttp-base AS vhttp-crm {{ if env.version | startswith("7") then ( -}} COPY --from=admin-build-crm /var/www/html . {{ ) else ( -}} COPY --from=admin-build-crm /var/www/drupal . {{ ) end -}} -FROM admin-minimal as admin-cms +FROM admin-minimal AS admin-cms {{ if env.version | startswith("7") then ( -}} COPY --from=admin-build-cms /var/www/html . {{ ) else ( -}} COPY --from=admin-build-cms /var/www/drupal . {{ ) end -}} -FROM admin-minimal as admin-crm +FROM admin-minimal AS admin-crm {{ if env.version | startswith("7") then ( -}} COPY --from=admin-build-crm /var/www/html . {{ ) else ( -}} diff --git a/compose/bin/docker-compose-install.sh b/compose/bin/docker-compose-install.sh index 20d376b..b0ad66f 100644 --- a/compose/bin/docker-compose-install.sh +++ b/compose/bin/docker-compose-install.sh @@ -1,4 +1,4 @@ # this project depends on the old docker-compose, pre-V2. # this script gets the latest pre-V2 version -curl -SL https://github.com/docker/compose/releases/download/v1.25.2/docker-compose-linux-x86_64 -o docker-compose +curl -SL https://github.com/docker/compose/releases/download/v1.29.2/docker-compose-linux-x86_64 -o docker-compose chmod ugo+x docker-compose diff --git a/compose/bin/stack-generate.sh b/compose/bin/stack-generate.sh index e2a9e8a..a00cf61 100755 --- a/compose/bin/stack-generate.sh +++ b/compose/bin/stack-generate.sh @@ -30,4 +30,9 @@ do shift done #echo "-f ${VSITE_COMPOSE_PROJECT_VARIANT}/${BASE}.yml $CONFIGS config | sed 's/{VSITE/\${VSITE/g' | sed \"s/ \([^[:space:]]*\): ''$/ - \1/\" > ${VSITE_COMPOSE_PROJECT_VARIANT}/${GENNAME}.yml" -bin/docker-compose -f ${VSITE_COMPOSE_PROJECT_VARIANT}/${BASE}.yml $CONFIGS config | sed 's/{VSITE/\${VSITE/g' | sed "s/ \([^[:space:]]*\): ''$/ - \1/" | sed 's/60666/\${VSITE_SFTP_PORT}/' | sed 's/60667/\${VSITE_SSH_PORT}/' | sed 's/60668/${VSITE_MYSQL_PORT}/' | sed 's/60669/${VSITE_PHPMYADMIN_PORT}/' | sed 's/60670/${VSITE_BACKUP_PORT}/' > ${VSITE_COMPOSE_PROJECT_VARIANT}/${GENNAME}.yml +bin/docker-compose -f ${VSITE_COMPOSE_PROJECT_VARIANT}/${BASE}.yml $CONFIGS config \ + | sed 's/{VSITE/\${VSITE/g' | sed 's/{COMPOSE_PROJECT_NAME/\${COMPOSE_PROJECT_NAME/g' | sed "s/ \([^[:space:]]*\): ''$/ - \1/" \ + | sed 's/60666/\${VSITE_SFTP_PORT}/' | sed 's/60667/\${VSITE_SSH_PORT}/' \ + | sed 's/60668/${VSITE_MYSQL_PORT}/' | sed 's/60669/${VSITE_PHPMYADMIN_PORT}/' | sed 's/60670/${VSITE_BACKUP_PORT}/' \ + | sed 's/cpus: 1.0/cpus: "1"/' | sed 's/cpus: 2.0/cpus: "2"/' \ + > ${VSITE_COMPOSE_PROJECT_VARIANT}/${GENNAME}.yml diff --git a/compose/deploy.yml b/compose/deploy.yml index 5ce7c8f..301cafc 100644 --- a/compose/deploy.yml +++ b/compose/deploy.yml @@ -53,7 +53,7 @@ services: replicas: 1 resources: limits: - cpus: "{VSITE_HTTP_CPUS-2}" + cpus: "2" memory: "{VSITE_HTTP_MEMORY-800M}" restart_policy: max_attempts: 2 diff --git a/compose/network.yml b/compose/network.yml new file mode 100644 index 0000000..abc61e2 --- /dev/null +++ b/compose/network.yml @@ -0,0 +1,16 @@ +# to use this, we need to define: +# VSITE_NETWORK +version: '3.5' +networks: + vsite_network: + external: true + name: "{VSITE_NETWORK}" +services: + admin: + networks: + - default + - vsite_network + vhttp: + networks: + - default + - vsite_network