FROM php:8.2-fpm-alpine # Install Nginx, Python (for report generation), PostgreSQL libs, and PHP extensions RUN apk add --no-cache nginx python3 postgresql-dev && \ docker-php-ext-install pdo pdo_pgsql # Copy Nginx config COPY nginx.conf /etc/nginx/http.d/default.conf # Copy application files WORKDIR /app COPY api.php auth.php index.html ./ COPY report_generator.py ./ COPY css/ css/ COPY js/ js/ # Create directories RUN mkdir -p /app/uploads /app/results /app/logs && \ chown -R www-data:www-data /app/uploads /app/results /app/logs # Start both Nginx and PHP-FPM COPY docker-entrypoint-web.sh /docker-entrypoint-web.sh RUN chmod +x /docker-entrypoint-web.sh EXPOSE 80 CMD ["/docker-entrypoint-web.sh"]