diff --git a/src/docker/Dockerfile b/src/docker/Dockerfile index 727d970..2b107ae 100644 --- a/src/docker/Dockerfile +++ b/src/docker/Dockerfile @@ -1,11 +1,10 @@ -ARG phpVersion=8.3-dev -FROM php:${phpVersion}-fpm +FROM php:7.4-fpm ARG WORKDIR=/var/www/html ENV DOCUMENT_ROOT=${WORKDIR} ENV LARAVEL_PROCS_NUMBER=1 -ENV DOMAIN=_ +ENV DOMAIN=emurgo.io ENV CLIENT_MAX_BODY_SIZE=15M -ENV NODE_VERSION=20.x +ENV NODE_VERSION=17.x ARG GROUP_ID=1000 ARG USER_ID=1000 ENV USER_NAME=www-data @@ -39,21 +38,9 @@ RUN apt-get update && apt-get install -y nginx # Clear cache RUN apt-get clean && rm -rf /var/lib/apt/lists/* -# Install Kafka -RUN git clone https://github.com/arnaud-lb/php-rdkafka.git\ - && cd php-rdkafka \ - && phpize \ - && ./configure \ - && make all -j 5 \ - && make install - -# Install Rdkafka and enable it -RUN docker-php-ext-enable rdkafka \ - && cd .. \ - && rm -rf /php-rdkafka # Install PHP extensions zip, mbstring, exif, bcmath, intl -RUN docker-php-ext-configure gd --with-freetype --with-jpeg +RUN docker-php-ext-configure gd RUN docker-php-ext-install zip mbstring exif pcntl bcmath -j$(nproc) gd intl mysqli # Install Redis and enable it @@ -69,7 +56,6 @@ RUN docker-php-ext-install pdo_mysql # Install the PHP pdo_pgsql extention RUN docker-php-ext-install pdo_pgsql - # Install PHP Opcache extention RUN docker-php-ext-install opcache @@ -88,21 +74,24 @@ ADD src/opcache.ini $PHP_INI_DIR/conf.d/ ADD src/supervisor/supervisord.conf /etc/supervisor/supervisord.conf COPY src/entrypoint.sh /usr/local/bin/ -RUN chmod +x /usr/local/bin/entrypoint.sh && \ - ln -s /usr/local/bin/entrypoint.sh / +RUN chmod +x /usr/local/bin/entrypoint.sh +RUN ln -s /usr/local/bin/entrypoint.sh / + +RUN rm -rf /etc/nginx/conf.d/default.conf +RUN rm -rf /etc/nginx/sites-enabled/default +RUN rm -rf /etc/nginx/sites-available/default -RUN rm -rf /etc/nginx/conf.d/default.conf && \ -rm -rf /etc/nginx/sites-enabled/default && \ - rm -rf /etc/nginx/sites-available/default && \ - rm -rf /etc/nginx/nginx.conf +RUN rm -rf /etc/nginx/nginx.conf COPY src/nginx.conf /etc/nginx/nginx.conf COPY src/default.conf /etc/nginx/conf.d/ -RUN usermod -u ${USER_ID} ${USER_NAME} && \ - groupmod -g ${USER_ID} ${GROUP_NAME} +RUN usermod -u ${USER_ID} ${USER_NAME} +RUN groupmod -g ${USER_ID} ${GROUP_NAME} -RUN mkdir -p /var/log/supervisor /var/log/nginx /var/cache/nginx +RUN mkdir -p /var/log/supervisor +RUN mkdir -p /var/log/nginx +RUN mkdir -p /var/cache/nginx RUN chown -R ${USER_NAME}:${GROUP_NAME} /var/www && \ chown -R ${USER_NAME}:${GROUP_NAME} /var/log/ && \ @@ -111,9 +100,9 @@ RUN chown -R ${USER_NAME}:${GROUP_NAME} /var/www && \ touch /var/run/nginx.pid && \ chown -R $USER_NAME:$USER_NAME /var/cache/nginx && \ chown -R $USER_NAME:$USER_NAME /var/lib/nginx/ && \ - chown -R $USER_NAME:$USER_NAME /etc/nginx/nginx.conf && \ chown -R $USER_NAME:$USER_NAME /var/run/nginx.pid && \ chown -R $USER_NAME:$USER_NAME /var/log/supervisor && \ + chown -R $USER_NAME:$USER_NAME /etc/nginx/nginx.conf && \ chown -R $USER_NAME:$USER_NAME /etc/nginx/conf.d/ && \ chown -R ${USER_NAME}:${GROUP_NAME} /tmp