FROM php:8-fpm as php-fpm # Env ENV COMPOSER_ALLOW_SUPERUSER=1 # Install Packages RUN apt-get update -y RUN apt-get install -y nginx libmariadb-dev git libzip-dev zip unzip supervisor RUN docker-php-ext-install mysqli pdo pdo_mysql zip # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer #Install TTP WORKDIR /var/www RUN rm -rf html/ RUN composer create-project thetempusproject/thetempusproject html RUN chmod -R 777 html/ RUN chown -R www-data:www-data html/ # Copy Nginx configuration file RUN cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old COPY ./docker/ttp-nginx/nginx.conf /etc/nginx/nginx.conf # Copy Supervisor configuration file COPY ./docker/ttp-nginx/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Start Supervisor, which will start both Nginx and PHP-FPM CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]