Skip to content

Commit

Permalink
Merge branch 'main' of github.com:USEPA/webcms into EPAD8-2540-filter…
Browse files Browse the repository at this point in the history
…-for-private-media
  • Loading branch information
carsoncho committed Oct 22, 2024
2 parents 4bf7190 + 309c41f commit 110fc5d
Show file tree
Hide file tree
Showing 138 changed files with 3,339 additions and 788 deletions.
2 changes: 1 addition & 1 deletion services/drupal/.ddev/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: epa
type: drupal9
docroot: web
php_version: "8.1"
php_version: "8.2"
webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.aws.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.6"
services:
# AWS cli image set to talk to Minio. `f1 run aws s3 [ARG...]' is the replacement for
# `aws s3 [ARG...]' with overrides set.
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.6'
services:
elasticsearch:
container_name: ddev-${DDEV_SITENAME}-elasticsearch
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.gesso.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.6'
services:
gesso:
container_name: ddev-${DDEV_SITENAME}-gesso
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.localstack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.6"
services:
localstack:
container_name: ddev-${DDEV_SITENAME}-localstack
Expand Down
4 changes: 1 addition & 3 deletions services/drupal/.ddev/docker-compose.memcached.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.6'

services:
memcached:
container_name: ddev-${DDEV_SITENAME}-memcached
Expand All @@ -17,4 +15,4 @@ services:
- ".:/mnt/ddev_config"
web:
links:
- memcached:memcached
- memcached:memcached
10 changes: 6 additions & 4 deletions services/drupal/.ddev/docker-compose.minio.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.6"

services:
minio:
container_name: ddev-${DDEV_SITENAME}-minio
Expand All @@ -10,13 +8,17 @@ services:
- minio
- server
- /data
- --console-address
- :9090
environment:
MINIO_ACCESS_KEY: minio_access
MINIO_SECRET_KEY: minio_secret
MINIO_UID: $DDEV_UID
MINIO_GUID: $DDEV_UID
MINIO_DOMAIN: minio
VIRTUAL_HOST: $DDEV_HOSTNAME
HTTP_EXPOSE: 9001:9000
HTTPS_EXPOSE: 9002:9000
HTTP_EXPOSE: "9001:9000,9089:9090"
HTTPS_EXPOSE: "9002:9000,9090:9090"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
Expand Down
2 changes: 0 additions & 2 deletions services/drupal/.ddev/docker-compose.mysql.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.6"

services:
mysql:
container_name: ddev-${DDEV_SITENAME}-mysql
Expand Down
2 changes: 0 additions & 2 deletions services/drupal/.ddev/docker-compose.simplesaml.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.6"

services:
simplesaml:
container_name: ddev-${DDEV_SITENAME}-simplesaml
Expand Down
1 change: 0 additions & 1 deletion services/drupal/.ddev/docker-compose.volumes.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.6"
services:
web:
volumes:
Expand Down
1 change: 1 addition & 0 deletions services/drupal/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
WEBCMS_HASH_SALT=abcdefg

WEBCMS_S3_BUCKET=drupal
WEBCMS_S3_SNAPSHOT_BUCKET=f1-webcms-snapshot-testing
WEBCMS_S3_REGION=us-east-1

WEBCMS_CF_DISTRIBUTIONID=abcdef
Expand Down
50 changes: 7 additions & 43 deletions services/drupal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,4 @@
FROM public.ecr.aws/docker/library/php:8.1-fpm-alpine AS memcached-ext

# Set working directory to /tmp
WORKDIR /tmp

# First, install compile-time dependencies
RUN apk add --no-cache $PHPIZE_DEPS libmemcached-dev zlib-dev

# Next, install the prequisite igbinary extension
RUN pecl install igbinary

# Finally, build and install memcached. We have to do this instead of the
# traditional pecl install method because we pass custom flags to memcached's
# ./configure script, which does not appear to be supported by the pecl command.
RUN set -ex \
&& PECL_MEMCACHED_VERSION=3.2.0 \
&& cd /tmp \
&& pecl download memcached-$PECL_MEMCACHED_VERSION \
&& tar xzf memcached-$PECL_MEMCACHED_VERSION.tgz \
&& cd memcached-$PECL_MEMCACHED_VERSION \
&& phpize \
&& ./configure --enable-memcached-igbinary \
&& make \
&& make install

FROM public.ecr.aws/docker/library/php:8.1-fpm-alpine AS base
FROM public.ecr.aws/docker/library/php:8.2-fpm-alpine AS base

# Bump system packages
RUN apk upgrade
Expand All @@ -48,15 +23,9 @@ RUN set -ex \

WORKDIR /var/www/html

# Copy and enable the memcached extension (and its dependency, igbinary)
COPY --from=memcached-ext \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/igbinary.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/memcached.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/
RUN docker-php-ext-enable igbinary && docker-php-ext-enable memcached

# APK packages needed by this image
RUN install-php-extensions apcu sockets \
# PHP packages needed by this image
RUN install-php-extensions apcu sockets igbinary memcached \
# APK packages needed by this image
&& apk add --no-cache \
# Needed by the memcached extension
libmemcached \
Expand Down Expand Up @@ -239,7 +208,7 @@ CMD [ "nginx", "-g", "daemon off;" ]

# Build a drush-specific image: this image includes command-line utilities such as mysql
# and ssh that are inappropriate for a server container image.
FROM public.ecr.aws/docker/library/php:8.1-cli-alpine AS drush
FROM public.ecr.aws/docker/library/php:8.2-cli-alpine AS drush

# Bump system packages
RUN apk upgrade
Expand All @@ -253,6 +222,8 @@ RUN set -ex \
opcache \
pdo_mysql \
zip \
igbinary \
memcached \
&& apk add --no-cache \
mysql-client \
openssh \
Expand All @@ -265,13 +236,6 @@ RUN set -ex \
ENV PATH=${PATH}:/var/www/html/vendor/bin
WORKDIR /var/www/html

# Copy and enable the memcached extension (and its dependency, igbinary)
COPY --from=memcached-ext \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/igbinary.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/memcached.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20210902/
RUN docker-php-ext-enable igbinary && docker-php-ext-enable memcached

# APK packages needed by this image
RUN install-php-extensions apcu sockets \
&& apk add --no-cache \
Expand Down
15 changes: 10 additions & 5 deletions services/drupal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
}
],
"require": {
"php": ">=8.1",
"php": ">=8.2",
"briancherne/jquery-hoverintent": "^1.10",
"ckeditor-plugin/fakeobjects": "^4.15",
"ckeditor-plugin/iframe": "^4.15",
Expand Down Expand Up @@ -219,7 +219,9 @@
"drupal/filter_html_plus": "^2.0",
"drupal/fixed_block_content": "^1.1",
"drupal/flag": "^4.0@beta",
"drupal/flood_control": "^2.1",
"drupal/flood_control": "^2.3",
"drupal/flysystem": "^2.0@beta",
"drupal/flysystem_s3": "^2.1",
"drupal/focal_point": "^2.0@alpha",
"drupal/gcontent_moderation": "1.x-dev",
"drupal/gin": "^3.0",
Expand Down Expand Up @@ -253,8 +255,10 @@
"drupal/mediaelement": "^2.0",
"drupal/memcache": "^2.3",
"drupal/metatag": "^1.11",
"drupal/metatag_google_scholar": "^1.2",
"drupal/module_filter": "^4.0",
"drupal/native_lazy_loading": "^1.1@RC",
"drupal/node_title_help_text": "^1.4",
"drupal/page_manager": "^4.0@RC",
"drupal/paragraphs": "^1.9",
"drupal/paragraphs_entity_embed": "2.x-dev",
Expand Down Expand Up @@ -287,11 +291,12 @@
"drupal/token": "^1.9",
"drupal/token_filter": "^2.0",
"drupal/token_formatters": "^1.0@alpha",
"drupal/tome": "^1.11",
"drupal/transliterate_filenames": "^2.0",
"drupal/twig_field_value": "^2.0",
"drupal/twig_tweak": "^3.2",
"drupal/ultimate_cron": "^2.0-alpha5",
"drupal/upgrade_status": "^4.0",
"drupal/upgrade_status": "^4.3",
"drupal/user_permission_condition": "^1.1",
"drupal/uswds_ckeditor_integration": "^2.0",
"drupal/view_modes_display": "^3.0",
Expand All @@ -306,7 +311,7 @@
"drupal/webform": "^6.2@beta",
"drupal/webform_validation": "^2.0@RC",
"drupal_git/viewsreference_filter": "1.x-dev",
"drush/drush": "^12",
"drush/drush": "^13",
"highlightjs/highlight.js": "^9.7",
"jsq/amazon-es-php": "^0.3.0",
"kint-php/kint": "^3.3",
Expand Down Expand Up @@ -344,7 +349,7 @@
"ext-gd": "1.0.0",
"ext-opcache": "1.0.0",
"ext-pdo": "1.0.0",
"php": "8.1.16"
"php": "8.2"
},
"allow-plugins": {
"composer/installers": true,
Expand Down
Loading

0 comments on commit 110fc5d

Please sign in to comment.