pp-planer/build/Dockerfile
Thorsten Bus 1eb4f1642f rename cts-work to pp-planer, move Dockerfile to build/, optimize dev scripts
- Rename all cts-work references to pp-planer (valet, sanctum, playwright, e2e, docs)
- Fix docker-compose build context to use project root with build/Dockerfile
- Add .dockerignore to exclude unnecessary files from Docker build
- start_dev.sh: stale PID cleanup, dependency checks, APP_KEY check, process health verification
- stop_dev.sh: fix set -e crash on arithmetic, report already-dead processes, idempotent exit
2026-03-30 16:00:02 +02:00

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"]