feat: integrate Kafka support with producer and consumer implementation
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m48s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m38s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m26s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m42s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Failing after 3m28s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 2m4s

This commit is contained in:
2025-11-12 15:16:03 -05:00
parent f8b988ca0d
commit e0ba77556d
8 changed files with 231 additions and 90 deletions

View File

@@ -14,12 +14,23 @@ RUN composer install --optimize-autoloader --ignore-platform-reqs --no-dev
# Use the official PHP CLI image with Alpine Linux for the second stage
FROM php:8.4.14-alpine AS php
ARG KAFKA_ENABLED=0
# Move the production PHP configuration file to the default location
RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini \
&& apk add libpq-dev linux-headers --no-cache \
&& docker-php-ext-install pdo_pgsql sockets pcntl \
&& rm -rf /var/cache/apk/*
RUN if [ "$KAFKA_ENABLED" -eq 1 ] ; then \
echo "Kafka support enabled" ; \
apk add autoconf g++ librdkafka-dev make --no-cache ; \
pecl install rdkafka && docker-php-ext-enable rdkafka ; \
else \
echo "Kafka support disabled" ; \
exit 0 ; \
fi
# Set the working directory to /app
WORKDIR /app