Skip to content

Commit

Permalink
Merge branch 'main' of github.com:USEPA/webcms into live-merge-main-v…
Browse files Browse the repository at this point in the history
…ersion-8-12
  • Loading branch information
carsoncho committed Aug 12, 2024
2 parents 8fb269f + 6e29d91 commit 65defb8
Show file tree
Hide file tree
Showing 74 changed files with 7,116 additions and 12,085 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ Here is a list of helpful commands:
* `ddev epa-import` > Will import a specific database.
* `ddev epa-export` > Exports a database with the current date.
* `ddev aws-setup` > Sets up the requirements to get drupal file system to work
* `ddev describe` or `ddev status` > Get a detailed description of a running DDEV project.
* `ddev phpmyadmin` > Launch a browser with PhpMyAdmin

# Disclaimer

Expand Down
64 changes: 64 additions & 0 deletions services/drupal/.ddev/commands/host/phpmyadmin
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash

## #ddev-generated: If you want to edit and own this file, remove this line.
## Description: Launch a browser with PhpMyAdmin
## Usage: phpmyadmin
## Example: "ddev phpmyadmin"

if [ "${DDEV_PROJECT_STATUS-running}" != "running" ] && [ -z "$no_recursion" ]; then
echo "Project ${DDEV_PROJECT} is not running, starting it"
ddev start
start_exit_code=$?
if [ $start_exit_code -ne 0 ]; then
exit $start_exit_code
fi
# run this script again, as the environment is updated after "ddev start"
no_recursion=true ddev "$(basename "$0")" "$@"
exit $?
fi

DDEV_PHPMYADMIN_PORT=8036
DDEV_PHPMYADMIN_HTTPS_PORT=8037

FULLURL=${DDEV_PRIMARY_URL}
HTTPS=""
if [ ${DDEV_PRIMARY_URL%://*} = "https" ]; then HTTPS=true; fi

if [[ ! -z "${GITPOD_INSTANCE_ID}" ]] || [[ "${CODESPACES}" == "true" ]]; then
FULLURL="${FULLURL/-${DDEV_HOST_WEBSERVER_PORT}/-${DDEV_PHPMYADMIN_PORT}}"
else
if [ "${HTTPS}" = "" ]; then
FULLURL="${FULLURL%:[0-9]*}:${DDEV_PHPMYADMIN_PORT}"
else
FULLURL="${FULLURL%:[0-9]*}:${DDEV_PHPMYADMIN_HTTPS_PORT}"
fi
fi

if [ -n "${1:-}" ] ; then
if [[ ${1::1} != "/" ]] ; then
FULLURL="${FULLURL}/";
fi

FULLURL="${FULLURL}${1}";
fi

if [ "${DDEV_DEBUG:-}" = "true" ]; then
printf "FULLURL $FULLURL\n" && exit 0
fi

case $OSTYPE in
linux-gnu)
if [[ ! -z "${GITPOD_INSTANCE_ID}" ]]; then
gp preview ${FULLURL}
else
xdg-open ${FULLURL}
fi
;;
"darwin"*)
open ${FULLURL}
;;
"win*"* | "msys"*)
start ${FULLURL}
;;
esac

2 changes: 1 addition & 1 deletion services/drupal/.ddev/docker-compose.gesso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.6'
services:
gesso:
container_name: ddev-${DDEV_SITENAME}-gesso
image: forumone/gesso:3-node-v16-php-8.0
build: ./gesso
command: "sleep infinity"
volumes:
- ./../web/themes/epa_theme:/var/www/html/web/themes/epa_theme:cached
Expand Down
4 changes: 4 additions & 0 deletions services/drupal/.ddev/docker-compose.phpmyadmin-norouter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#ddev-generated
# If omit_containers[ddev-router] then this file will be replaced
# with another with a `ports` statement to directly expose port 80 to 8036
services: {}
26 changes: 26 additions & 0 deletions services/drupal/.ddev/docker-compose.phpmyadmin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
phpmyadmin:
container_name: ddev-${DDEV_SITENAME}-phpmyadmin
image: phpmyadmin:5
working_dir: "/root"
restart: "no"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
expose:
- "80"
environment:
- PMA_USER=web
- PMA_PASSWORD=web
- PMA_HOST=mysql
- PMA_PORT=3306
- VIRTUAL_HOST=$DDEV_HOSTNAME
- UPLOAD_LIMIT=4000M
- HTTP_EXPOSE=8036:80
- HTTPS_EXPOSE=8038:80
healthcheck:
interval: 120s
timeout: 2s
retries: 1
depends_on:
- mysql
3 changes: 3 additions & 0 deletions services/drupal/.ddev/gesso/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM forumone/gesso:3-node-v18-php-8.1

RUN npm i -g gulp-cli
11 changes: 9 additions & 2 deletions services/drupal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ RUN set -ex \
-e 's/^;\(ping\.path =\)/\1/' \
# 2. The 'status' endpoint response with metrics related to this FPM worker pool
-e 's/^;\(pm\.status_path =\)/\1/' \
/usr/local/etc/php-fpm.d/www.conf
/usr/local/etc/php-fpm.d/www.conf \
&& { \
# Switch the PHP-FPM pool to a static group of 10 servers. Restart the
# servers every 5,000 requests.
echo 'pm = static'; \
echo 'pm.max_children = 10'; \
echo 'pm.max_requests = 5000'; \
} >> /usr/local/etc/php-fpm.d/zz-docker.conf

# Set the php-fpm log format. This was largely reverse-engineered from fpm_log.c in the
# PHP sources. Notes on the available log options:
Expand Down Expand Up @@ -142,7 +149,7 @@ RUN composer install \
RUN rm auth.json

# Build Gesso, the WebCMS' theme
FROM forumone/gesso:3-node-v16-php-8.0 AS gesso
FROM forumone/gesso:3-node-v18-php-8.1 AS gesso

WORKDIR /app

Expand Down
Loading

0 comments on commit 65defb8

Please sign in to comment.