Files
screamingFrog/Dockerfile
Martin a6e2a7733e Fix Docker container startup and API endpoint configuration
- Update Dockerfile to use inline CMD instead of external start.sh script to resolve execution issues with CRLF line endings
- Fix nginx fastcgi_pass configuration to use localhost:9000 for PHP-FPM communication
- Correct API endpoint paths in frontend from /src/api.php to /api.php to match nginx document root configuration
- Ensure Composer dependencies are properly installed with PHP 8.3 compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 20:20:20 +02:00

43 lines
966 B
Docker

FROM php:8.3-fpm
# Install system dependencies
RUN apt-get update && apt-get install -y \
nginx \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
zip \
unzip \
git \
curl \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql mysqli zip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Configure nginx
RUN rm -rf /etc/nginx/sites-enabled/default
# Configure PHP-FPM
RUN sed -i 's/listen = 127.0.0.1:9000/listen = 9000/g' /usr/local/etc/php-fpm.d/www.conf
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY ./src /var/www/html
# Set permissions
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
# Expose port 80
EXPOSE 80
# Start PHP-FPM and Nginx
CMD php-fpm -D && nginx -g 'daemon off;'