Skip to content

Commit

Permalink
add php-fpm 8.3 build and nginx unit php 8.2 build to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal committed Jan 25, 2024
1 parent 96b7ca3 commit e09efce
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 7 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci-build-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,33 @@ jobs:
--platform linux/amd64,linux/arm/v7,linux/arm64 \
-f Dockerfile.8.2 \
-t ghcr.io/paskal/bitrix-php:8.2 -t paskal/bitrix-php:8.2 .
- name: build PHP 8.3 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/arm/v7,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/arm/v7,linux/arm64 \
-f Dockerfile.unit.8.2 \
-t ghcr.io/paskal/nginx-unit-bitrix:8.2 -t paskal/nginx-unit-bitrix:8.2 .
4 changes: 2 additions & 2 deletions config/php/Dockerfile.8.1
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ RUN apt-get update \
msmtp-mta \
sudo \
cron \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
&& 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 container won't work if you forget to mount 90-php.ini
# without this, php in the container won't work if you forget to mount 90-php.ini
COPY ./90-php.ini /etc/php/8.1/fpm/conf.d/90-php.ini
COPY ./90-php.ini /etc/php/8.1/cli/conf.d/90-php.ini
# disable xdebug by default as it affects performance badly
Expand Down
4 changes: 2 additions & 2 deletions config/php/Dockerfile.8.2
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ RUN apt-get update \
msmtp-mta \
sudo \
cron \
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
&& 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 container won't work if you forget to mount 90-php.ini
# without this, php in the container won't work if you forget to mount 90-php.ini
COPY ./90-php.ini /etc/php/8.2/fpm/conf.d/90-php.ini
COPY ./90-php.ini /etc/php/8.2/cli/conf.d/90-php.ini
# disable xdebug by default as it affects performance badly
Expand Down
45 changes: 45 additions & 0 deletions config/php/Dockerfile.8.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM phpdockerio/php:8.3-fpm
# https://github.com/bitrixdock/bitrixdock/blob/master/php/php83/Dockerfile

LABEL org.opencontainers.image.authors="Dmitry Verkhoturov <paskal.07@gmail.com>" \
org.opencontainers.image.description="PHP-fpm 8.3 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 \
&& apt-get -y --no-install-recommends install \
php8.3-gd \
php8.3-imagick \
php8.3-interbase \
php8.3-intl \
php8.3-mbstring \
php8.3-mcrypt \
php8.3-memcache \
php8.3-memcached \
php8.3-mysql \
php8.3-opcache \
php8.3-soap \
php8.3-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 if you forget to mount 90-php.ini
COPY ./90-php.ini /etc/php/8.3/fpm/conf.d/90-php.ini
COPY ./90-php.ini /etc/php/8.3/cli/conf.d/90-php.ini
# disable xdebug by default as it affects performance badly
COPY ./xdebug.ini /etc/php/8.3/mods-available/xdebug.ini

RUN usermod -u 1000 www-data
RUN groupmod -g 1000 www-data

EXPOSE 9000
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ 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"]

1 change: 0 additions & 1 deletion config/php/nginx-unit.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@
},
"access_log": "/var/log/php/unit-access.log"
}

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ services:
dockerfile: Dockerfile.unit
hostname: nginx-unit
container_name: nginx-unit
image: paskal/nginx-unit:8.2-bitrix
image: paskal/nginx-unit-bitrix:8.2
restart: always
depends_on:
- memcached
Expand Down

0 comments on commit e09efce

Please sign in to comment.