# Use FrankenPHP image with full registry path FROM docker.io/dunglas/frankenphp:php8.2 RUN apt-get update && apt-get install -y cron \ supervisor \ vim \ nano # add additional extensions here: RUN install-php-extensions \ @composer \ pgsql \ pdo_pgsql \ mysqli \ pdo_mysql \ bcmath \ bz2 \ dba \ gd \ gettext \ sockets \ sodium \ zip \ ldap \ redis # Create and set working directory WORKDIR /app # Create a dir incase uploads dir needs to work #RUN mkdir uploads # Set custom php.ini file #COPY ./php.ini /usr/local/etc/php/php.ini # Set the custom Caddyfile: #COPY ./Caddyfile /etc/caddy/Caddyfile #COPY ./Caddyfile /etc/frankenphp/Caddyfile # Only now copy the rest of the application COPY . . # Install dependencies RUN composer install # Final steps that depend on the application code RUN composer dump-autoload --optimize # Add cron for vector process #RUN (crontab -l 2>/dev/null; echo "* * * * * /usr/local/bin/php /app/bin/console app:vector-store-process-files") | crontab - # #RUN (crontab -l 2>/dev/null; echo "* * * * * /usr/local/bin/php --version | tee -a /tmp/test.txt") | crontab - # # Make sure the process file executable is executeable #RUN chmod +x vector-store-file-processor.sh # Add cron to supervisor #COPY ./cron.conf /etc/supervisor/conf.d/ # Add vector-store-file-processor.conf to supervisor #COPY ./vector-processing-transport.conf /etc/supervisor/conf.d/ #COPY ./failed-transport.conf /etc/supervisor/conf.d/ # Add supervisor to the entry point #RUN sed -i '/set -e/a \\n/usr/bin/supervisord -c /etc/supervisor/supervisord.conf \&\n' /usr/local/bin/docker-php-entrypoint