- Install Laravel 12 with Breeze (Vue stack + Inertia.js) - Configure Pest testing framework (5 tests passing) - Add Docker multi-stage build (PHP 8.3 + LibreOffice + ImageMagick) - Create docker-compose.yml with app + node services - Configure Vite for Docker hot-reload - Set app locale to 'de' (German) - Add Vue packages: @vueuse/core, vue-draggable-plus, vue3-dropzone - Update .env.example with all project vars - Relocate spike files: src/Cts/ → app/Cts/ (Laravel autoload) - Tests: 5 passed (14 assertions) - Vite build: successful - Docker: app container running Task: T1 - Laravel Scaffolding + Breeze Vue + Docker
60 lines
1.2 KiB
Docker
60 lines
1.2 KiB
Docker
FROM php:8.4-fpm-alpine
|
|
|
|
# Install system dependencies
|
|
RUN apk add --no-cache \
|
|
curl \
|
|
git \
|
|
zip \
|
|
unzip \
|
|
libzip-dev \
|
|
imagemagick \
|
|
libreoffice \
|
|
libreoffice-lang-de \
|
|
ghostscript \
|
|
poppler-utils \
|
|
sqlite \
|
|
sqlite-dev \
|
|
postgresql-client \
|
|
mysql-client \
|
|
nodejs \
|
|
npm
|
|
|
|
# Install PHP extensions (only those not built-in)
|
|
RUN docker-php-ext-install \
|
|
pdo_sqlite \
|
|
pdo_mysql \
|
|
zip \
|
|
bcmath
|
|
|
|
# Install Composer
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy application files
|
|
COPY . .
|
|
|
|
# Install PHP dependencies
|
|
RUN composer install --no-interaction --no-dev --optimize-autoloader
|
|
|
|
# Install Node dependencies
|
|
RUN npm install --legacy-peer-deps
|
|
|
|
# Build Vite assets
|
|
RUN npm run build
|
|
|
|
# Create necessary directories
|
|
RUN mkdir -p storage/logs storage/framework/views storage/framework/cache \
|
|
&& chmod -R 775 storage bootstrap/cache
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:8000/up || exit 1
|
|
|
|
# Start PHP-FPM
|
|
CMD ["php-fpm"]
|