diff --git a/.docker/base.Dockerfile b/.docker/base.Dockerfile new file mode 100644 index 00000000..e36687dd --- /dev/null +++ b/.docker/base.Dockerfile @@ -0,0 +1,9 @@ +FROM php:8.1.6-fpm as php +WORKDIR /app +RUN apt-get update +RUN apt-get install -y rsync libcurl3-dev apt-utils zlib1g-dev libpng-dev libicu-dev libonig-dev unzip +RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base texlive-pictures texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended texlive-fonts-extra +RUN docker-php-ext-install pdo_mysql curl gd exif intl mbstring pcntl +RUN pecl install redis && docker-php-ext-enable redis +RUN usermod -s /bin/bash www-data + diff --git a/.docker/php.Dockerfile b/.docker/php.Dockerfile index da28e88b..20fc491c 100644 --- a/.docker/php.Dockerfile +++ b/.docker/php.Dockerfile @@ -8,17 +8,10 @@ WORKDIR /app COPY . /app RUN npm install && npm run prod && npm run img && rm -R node_modules -FROM php:8.1.6-fpm as php -WORKDIR /app -RUN apt-get update -RUN apt-get install -y rsync libcurl3-dev apt-utils zlib1g-dev libpng-dev libicu-dev libonig-dev unzip -RUN apt-get install -y --no-install-recommends texlive-base texlive-latex-base texlive-pictures texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended texlive-fonts-extra -RUN docker-php-ext-install pdo_mysql curl gd exif intl mbstring pcntl -RUN pecl install redis && docker-php-ext-enable redis +FROM zoomyboy/adrema-base:latest as php COPY --chown=www-data:www-data . /app COPY --chown=www-data:www-data --from=node /app/public /app/public COPY --chown=www-data:www-data --from=composer /app/vendor /app/vendor -RUN usermod -s /bin/bash www-data USER www-data RUN php artisan telescope:publish diff --git a/.drone.yml b/.drone.yml index 1646ef17..ae587a9b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,13 +27,8 @@ steps: - npm ci && npm run img && npm run prod && rm -R node_modules - name: tests - image: php:8.1.6 + image: zoomyboy/adrema-base:latest commands: - - apt-get update > /dev/null - - apt-get install -y rsync libcurl3-dev apt-utils zlib1g-dev libpng-dev libicu-dev libonig-dev unzip > /dev/null - - apt-get install -y --no-install-recommends texlive-base texlive-latex-base texlive-pictures texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended texlive-fonts-extra > /dev/null - - docker-php-ext-install pdo_mysql curl gd exif intl mbstring pcntl > /dev/null - - pecl install redis && docker-php-ext-enable redis > /dev/null - php artisan migrate - php artisan test - rm -f .env