2026-04-19 20:33:56 -08:00
|
|
|
FROM php:8.5-fpm
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
nginx \
|
|
|
|
|
supervisor \
|
|
|
|
|
postgresql-client \
|
|
|
|
|
libpq-dev \
|
|
|
|
|
libpng-dev \
|
|
|
|
|
libjpeg-dev \
|
|
|
|
|
libfreetype-dev \
|
|
|
|
|
libzip-dev \
|
|
|
|
|
git \
|
|
|
|
|
unzip \
|
2026-05-12 16:28:47 -08:00
|
|
|
locales \
|
2026-05-16 10:45:33 -08:00
|
|
|
curl \
|
2026-05-24 18:23:05 -08:00
|
|
|
gettext-base \
|
2026-05-16 10:45:33 -08:00
|
|
|
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
|
|
|
|
&& apt-get install -y nodejs \
|
2026-04-19 20:33:56 -08:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
|
|
|
|
docker-php-ext-install -j"$(nproc)" \
|
|
|
|
|
pdo_pgsql \
|
|
|
|
|
pgsql \
|
|
|
|
|
gd \
|
|
|
|
|
zip \
|
|
|
|
|
exif \
|
|
|
|
|
bcmath
|
|
|
|
|
|
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
|
|
2026-05-01 02:59:34 -08:00
|
|
|
ENV PATH="/var/www/html/vendor/bin:${PATH}"
|
|
|
|
|
|
2026-04-19 20:33:56 -08:00
|
|
|
WORKDIR /var/www/html
|
|
|
|
|
|
|
|
|
|
# Copy composer manifest first for layer caching; install pulls Drupal from Packagist.
|
|
|
|
|
# To use ../drupal instead, add it as a path repository in composer.json:
|
|
|
|
|
# "repositories": [{"type": "path", "url": "../drupal/core", "options": {"symlink": false}}]
|
2026-05-01 03:01:12 -08:00
|
|
|
# then bump drupal/core-recommended to "11.x-dev@dev" and rebuild.
|
2026-05-16 10:45:33 -08:00
|
|
|
COPY composer.json package.json tailwind.config.js ./
|
|
|
|
|
|
|
|
|
|
RUN npm install --include=dev
|
2026-05-01 03:18:57 -08:00
|
|
|
|
|
|
|
|
RUN composer config repositories.drupal composer https://packages.drupal.org/8
|
2026-05-01 03:26:46 -08:00
|
|
|
|
|
|
|
|
## Composer requires
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Core
|
|
|
|
|
RUN composer require composer/installers:^2.3 --no-update
|
|
|
|
|
RUN composer require drupal/core-recommended:^11 --no-update
|
|
|
|
|
RUN composer require drupal/core-composer-scaffold:^11 --no-update
|
|
|
|
|
RUN composer require drush/drush:"^13 || ^14" --no-update
|
|
|
|
|
|
|
|
|
|
# Extra
|
2026-05-12 16:28:47 -08:00
|
|
|
RUN composer require drupal/webform drupal/symfony_mailer drupal/claro_compact --no-update
|
2026-05-01 03:26:46 -08:00
|
|
|
|
|
|
|
|
#######
|
|
|
|
|
|
|
|
|
|
|
2026-04-19 20:33:56 -08:00
|
|
|
RUN composer install --no-dev --optimize-autoloader --no-interaction
|
|
|
|
|
|
|
|
|
|
# Overlay our site-specific files on top of the scaffolded web/
|
|
|
|
|
COPY web/sites/default/settings.php web/sites/default/settings.php
|
|
|
|
|
COPY web/sites/default/files/ web/sites/default/files/
|
2026-05-01 04:39:57 -08:00
|
|
|
COPY web/modules/custom/ web/modules/custom/
|
2026-05-12 16:28:47 -08:00
|
|
|
|
2026-05-16 10:45:33 -08:00
|
|
|
RUN npm run build
|
|
|
|
|
|
2026-05-12 16:28:47 -08:00
|
|
|
ARG FULLCALENDAR_VERSION=6.1.15
|
|
|
|
|
RUN curl -fsSL "https://cdn.jsdelivr.net/npm/fullcalendar@${FULLCALENDAR_VERSION}/index.global.min.js" \
|
|
|
|
|
-o web/modules/custom/riverside_pt/js/fullcalendar.min.js
|
2026-04-19 20:33:56 -08:00
|
|
|
COPY config/sync/ config/sync/
|
|
|
|
|
|
|
|
|
|
# Debian nginx runs as www-data (matches php-fpm), config in conf.d/
|
|
|
|
|
RUN rm -f /etc/nginx/sites-enabled/default
|
2026-05-24 18:23:05 -08:00
|
|
|
COPY docker/nginx/default.conf /etc/nginx/conf.d/default.conf.template
|
2026-04-19 20:33:56 -08:00
|
|
|
|
|
|
|
|
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
|
COPY docker/php/entrypoint.sh /entrypoint.sh
|
Add email field to booking form + dev mail mocking
- Add required email input (with autocomplete="email") to the booking
details form in the homepage Preact widget (rpt-booking.js).
Update EMPTY_FORM, submit payload, confirmedAppointment, and success
summary to include it. The form now collects: first/last name, email,
phone, comments.
- Update ScheduleController::storeSlot to extract/pass email in the
booking_request mail params (and require it for the full-contact path).
Log failures with details; return a structured error with a user-friendly
message instead of bare "mail_failed".
- riverside_pt_mail hook now includes the user's email in the notification
body (when provided).
- Dev improvements for mail:
- In DEBUG mode (default on localhost), force php_mail interface in
settings.php so the mailer uses the sendmail_path override.
- Dockerfile + entrypoint.sh now provide/install a fake-sendmail.sh
that prints the full email (To, Subject, headers, body from the
hook) to stderr (visible in `docker compose logs`) and always
succeeds (exit 0). This prevents "sh: 1: /usr/sbin/sendmail: not
found" and guarantees booking submissions never return the
"unable to send confirmation email" error in dev.
- In non-DEBUG, still uses symfony_mailer + Postmark as before.
- The fake is also baked into the image for consistency.
- JS error handling now prefers the server-provided 'message' from
the JSON error response (better UX for real mail failures).
- Update CLAUDE.md with the new email field + dev mail mocking behavior.
- New file: docker/php/fake-sendmail.sh (the mock).
This addresses the recent "mail_failed" issues while keeping production
email via Postmark.
2026-06-03 22:05:06 -08:00
|
|
|
COPY docker/php/fake-sendmail.sh /usr/local/bin/fake-sendmail.sh
|
|
|
|
|
RUN chmod +x /entrypoint.sh /usr/local/bin/fake-sendmail.sh && \
|
|
|
|
|
echo 'sendmail_path = /usr/local/bin/fake-sendmail.sh' > /usr/local/etc/php/conf.d/sendmail.ini
|
2026-04-19 20:33:56 -08:00
|
|
|
|
|
|
|
|
RUN chown -R www-data:www-data web/sites/default/files && \
|
|
|
|
|
chmod -R 755 web/sites/default/files && \
|
|
|
|
|
chmod 444 web/sites/default/settings.php
|
|
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|