Files
fotospiel-app/Dockerfile
Codex Agent ae9b9160ac - Added public gallery API with token-expiry enforcement, branding payload, cursor pagination, and per-photo download stream (app/Http/Controllers/Api/EventPublicController.php:1, routes/api.php:16). 410 is returned when the package gallery duration has lapsed.
- Served the guest PWA at /g/{token} and introduced a mobile-friendly gallery page with lazy-loaded thumbnails, themed colors, lightbox, and download links plus new gallery data client (resources/js/guest/pages/PublicGalleryPage.tsx:1, resources/js/guest/services/galleryApi.ts:1, resources/js/guest/router.tsx:1). Added i18n strings for the public gallery experience (resources/js/guest/i18n/messages.ts:1).
- Ensured checkout step changes snap back to the progress bar on mobile via smooth scroll anchoring (resources/ js/pages/marketing/checkout/CheckoutWizard.tsx:1).
- Enabled tenant admins to export all approved event photos through a new download action that streams a ZIP archive, with translations and routing in place (app/Http/Controllers/Tenant/EventPhotoArchiveController.php:1, app/Filament/Resources/EventResource.php:1, routes/web.php:1, resources/lang/de/admin.php:1, resources/lang/en/admin.php:1).
2025-10-17 23:24:06 +02:00

99 lines
2.5 KiB
Docker

# syntax=docker/dockerfile:1.6
ARG PHP_VERSION=8.3
ARG NODE_VERSION=20
################################################################################
# Node build stage - compile front-end assets
################################################################################
FROM node:${NODE_VERSION}-bookworm AS node_builder
WORKDIR /var/www/html
COPY package.json package-lock.json ./
RUN npm ci --no-audit --prefer-offline
COPY . .
RUN npm run build
################################################################################
# Composer dependencies
################################################################################
FROM composer:2 AS vendor
WORKDIR /var/www/html
COPY composer.json composer.lock ./
# Install production dependencies only, skip scripts (they run at runtime)
RUN composer install \
--no-dev \
--no-scripts \
--no-interaction \
--prefer-dist \
--optimize-autoloader
################################################################################
# PHP-FPM runtime image
################################################################################
FROM php:${PHP_VERSION}-fpm-bullseye AS app
ARG UID=1000
ARG GID=1000
ENV APP_ENV=production \
APP_DEBUG=false \
PHP_OPCACHE_VALIDATE_TIMESTAMPS=0
WORKDIR /opt/app
# Install system dependencies & PHP extensions
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
curl \
libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libzip-dev \
libonig-dev \
libicu-dev \
libxml2-dev \
unzip \
nano \
rsync \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
bcmath \
exif \
gd \
intl \
opcache \
pcntl \
pdo_mysql \
zip \
&& pecl install redis \
&& docker-php-ext-enable redis \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy application source
COPY . .
# Copy vendor dependencies and build artifacts
COPY --from=vendor /var/www/html/vendor ./vendor
COPY --from=node_builder /var/www/html/public/build ./public/build
# Copy production php.ini overrides if present
COPY docker/php/php.ini /usr/local/etc/php/conf.d/app.ini
COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
# Entrypoint prepares deployment directory on persistent volume
COPY docker/app/entrypoint.sh /usr/local/bin/app-entrypoint
RUN chmod +x /usr/local/bin/app-entrypoint
EXPOSE 9000
ENTRYPOINT ["app-entrypoint"]
CMD ["php-fpm"]