diff --git a/.github/workflows/ci-build-php.yml b/.github/workflows/ci-build-php.yml index bd431ac..8279edc 100644 --- a/.github/workflows/ci-build-php.yml +++ b/.github/workflows/ci-build-php.yml @@ -69,18 +69,3 @@ jobs: --platform linux/amd64,linux/arm64 \ -f Dockerfile.8.3 \ -t ghcr.io/paskal/bitrix-php:8.3 -t paskal/bitrix-php:8.3 . - - - name: build Nginx Unit PHP 8.2 image for ghcr.io and DockerHub - working-directory: config/php - if: ${{ github.ref == 'refs/heads/master' }} - env: - GITHUB_PACKAGE_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} - USERNAME: ${{ github.actor }} - run: | - echo ${GITHUB_PACKAGE_TOKEN} | docker login ghcr.io -u ${USERNAME} --password-stdin - echo ${DOCKER_HUB_TOKEN} | docker login -u paskal --password-stdin - docker buildx build --push \ - --platform linux/amd64,linux/arm64 \ - -f Dockerfile.unit.8.2 \ - -t ghcr.io/paskal/nginx-unit-bitrix:8.2 -t paskal/nginx-unit-bitrix:8.2 . diff --git a/config/php/Dockerfile.unit.8.2 b/config/php/Dockerfile.unit.8.2 deleted file mode 100644 index 201a3db..0000000 --- a/config/php/Dockerfile.unit.8.2 +++ /dev/null @@ -1,52 +0,0 @@ -FROM unit:php8.2 -# https://github.com/tippexs/nginxspace/blob/master/dev/Dockerfile - -LABEL org.opencontainers.image.authors="Dmitry Verkhoturov " \ - org.opencontainers.image.description="Nginx Unit with PHP 8.2 with everything needed for Bitrix" \ - org.opencontainers.image.documentation="https://github.com/paskal/bitrix.infra" \ - org.opencontainers.image.source="https://github.com/paskal/bitrix.infra.git" \ - org.opencontainers.image.title="php" - -#RUN apt-get update \ -# && -y apt-transport-https lsb-release ca-certificates wget \ -# && wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ -# && sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \ -# && apt-get update \ -# && apt-get -y --no-install-recommends install \ -# php8.2-gd \ -# php8.2-imagick \ -# php8.2-interbase \ -# php8.2-intl \ -# php8.2-mbstring \ -# php8.2-mcrypt \ -# php8.2-memcache \ -# php8.2-memcached \ -# php8.2-mysql \ -# php8.2-opcache \ -# php8.2-redis \ -# php8.2-soap \ -# php8.2-xdebug \ -# php8.2-zip \ -# webp \ -# msmtp \ -# msmtp-mta \ -# sudo \ -# cron \ -# && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* - -# msmtp to allow email sending -# msmtp-mta to allow sendmail usage with msmtp -# sudo to allow create logfile with www-data user -# cron to run cronjobs in a separate container - -# without this, php in the container won't work properly -COPY ./90-php.ini /etc/php/php.ini - -RUN usermod -u 1000 www-data -RUN groupmod -g 1000 www-data - -COPY nginx-unit.json /docker-entrypoint.d/.unit.conf.json - -EXPOSE 8090 8091 8092 8093 - -CMD ["unitd", "--no-daemon", "--control", "unix:/var/run/control.unit.sock"] diff --git a/config/php/nginx-unit.json b/config/php/nginx-unit.json deleted file mode 100644 index 433e303..0000000 --- a/config/php/nginx-unit.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "listeners": { - "0.0.0.0:8090": { - "application": "bitrix_urlrewrite_prod" - }, - "0.0.0.0:8091": { - "application": "bitrix_direct_prod" - }, - "0.0.0.0:8092": { - "application": "bitrix_urlrewrite_dev" - }, - "0.0.0.0:8093": { - "application": "bitrix_direct_dev" - } - }, - "applications": { - "bitrix_urlrewrite_prod": { - "type": "php", - "processes": { - "max": 20, - "spare": 5 - }, - "root": "/web/prod/", - "script": "bitrix/urlrewrite.php", - "user": "www-data", - "group": "www-data", - "options": { - "file": "/etc/php.ini", - "admin": { - "memory_limit": "1536M", - "variables_order": "EGPCS", - "expose_php": "0" - }, - "user": { - "display_errors": "0" - } - } - }, - "bitrix_direct_prod": { - "type": "php", - "processes": 20, - "root": "/web/prod/", - "index": "index.php", - "user": "www-data", - "group": "www-data", - "options": { - "file": "/etc/php.ini", - "admin": { - "memory_limit": "1536M", - "variables_order": "EGPCS", - "expose_php": "0" - }, - "user": { - "display_errors": "0" - } - } - }, - "bitrix_urlrewrite_dev": { - "type": "php", - "processes": { - "max": 20, - "spare": 5 - }, - "root": "/web/dev/", - "script": "bitrix/urlrewrite.php", - "user": "www-data", - "group": "www-data", - "options": { - "file": "/etc/php.ini", - "admin": { - "memory_limit": "1536M", - "variables_order": "EGPCS", - "expose_php": "0" - }, - "user": { - "display_errors": "1" - } - } - }, - "bitrix_direct_dev": { - "type": "php", - "processes": 20, - "root": "/web/dev/", - "index": "index.php", - "user": "www-data", - "group": "www-data", - "options": { - "file": "/etc/php.ini", - "admin": { - "memory_limit": "1536M", - "variables_order": "EGPCS", - "expose_php": "0" - }, - "user": { - "display_errors": "1" - } - } - } - }, - "access_log": "/var/log/php/unit-access.log" -} diff --git a/docker-compose.yml b/docker-compose.yml index 899d802..1278957 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -80,39 +80,6 @@ services: restart: unless-stopped - nginx-unit: - build: - context: ./config/php - dockerfile: Dockerfile.unit - hostname: nginx-unit - container_name: nginx-unit - image: ghcr.io/paskal/nginx-unit-bitrix:8.2 - restart: always - depends_on: - - memcached - - memcached-sessions - volumes: - - ./web/prod:/web/prod - - ./web/dev:/web/dev - - ./private/msmtprc:/etc/msmtprc - # MySQL socket to prevent transferring data through TCP - - ./private/mysqld:/var/run/mysqld - # Logs - - ./logs/php:/var/log/php - # configuration - - ./config/php/90-php.ini:/etc/php/php.ini - - ./config/php/nginx-unit.json:/docker-entrypoint.d/.unit.conf.json - # for monitoring purposes - - ./logs/nginx:/var/log/nginx - # switch timezone from UTC to Moscow - - ./config/php/moscow-timezone:/etc/timezone:ro - - ./config/php/moscow-localtime:/etc/localtime:ro - expose: - - "8090" # bitrix_urlrewrite_prod - - "8091" # bitrix_direct_prod - - "8092" # bitrix_urlrewrite_dev - - "8093" # bitrix_direct_dev - php: build: context: ./config/php