Deploy / deploy (push) Failing after 2m22s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
50 lines
1.2 KiB
Docker
50 lines
1.2 KiB
Docker
# Stage 1: Frontend-Assets bauen
|
|
FROM node:22-alpine AS node
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
COPY resources/ resources/
|
|
COPY vite.config.js ./
|
|
RUN mkdir -p public && npm run build
|
|
|
|
# Stage 2: FrankenPHP (Caddy + PHP in einem)
|
|
FROM dunglas/frankenphp:php8.4-alpine
|
|
|
|
# PHP-Extensions installieren (install-php-extensions löst System-Deps automatisch)
|
|
RUN install-php-extensions \
|
|
pdo_mysql \
|
|
mbstring \
|
|
gd \
|
|
zip \
|
|
bcmath \
|
|
intl \
|
|
exif \
|
|
pcntl \
|
|
opcache
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
WORKDIR /app
|
|
|
|
# Composer-Dependencies (erst nur json/lock für besseres Layer-Caching)
|
|
COPY composer.json composer.lock ./
|
|
RUN composer install --no-dev --no-scripts --no-autoloader --optimize-autoloader
|
|
|
|
# App-Code kopieren
|
|
COPY . .
|
|
|
|
# Gebaute Frontend-Assets reinkopieren
|
|
COPY --from=node /app/public/build public/build/
|
|
|
|
# Autoloader finalisieren
|
|
RUN composer dump-autoload --optimize --no-dev
|
|
|
|
# Berechtigungen setzen
|
|
RUN chown -R www-data:www-data storage bootstrap/cache \
|
|
&& chmod -R 775 storage bootstrap/cache
|
|
|
|
COPY docker/entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|