Skip to content

Commit

Permalink
Merge pull request #225 from devilbox/release-0.133
Browse files Browse the repository at this point in the history
Release 0.133
  • Loading branch information
cytopia authored Feb 2, 2022
2 parents 928c712 + d3e642b commit f0b758e
Show file tree
Hide file tree
Showing 21 changed files with 2,287 additions and 46 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
steps:

# ------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ jobs:
- '7.4'
- '8.0'
- '8.1'
- '8.2'
refs:
- 'master'
- '0.132'
- '0.133'
steps:

# ------------------------------------------------------------
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
## Unreleased


## Release 0.133

#### Added
- Added PHP 8.2: https://github.com/devilbox/docker-php-fpm-8.2


## Release 0.132

#### Fixed
Expand Down
104 changes: 104 additions & 0 deletions Dockerfiles/base/Dockerfile-8.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-8.2
MAINTAINER "cytopia" <[email protected]>


###
### Labels
###
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
#LABEL "org.opencontainers.image.created"=""
#LABEL "org.opencontainers.image.version"=""
#LABEL "org.opencontainers.image.revision"=""
LABEL "maintainer"="cytopia <[email protected]>"
LABEL "org.opencontainers.image.authors"="cytopia <[email protected]>"
LABEL "org.opencontainers.image.url"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.documentation"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.source"="https://github.com/devilbox/docker-php-fpm"
LABEL "org.opencontainers.image.vendor"="devilbox"
LABEL "org.opencontainers.image.licenses"="MIT"
LABEL "org.opencontainers.image.ref.name"="8.2-base"
LABEL "org.opencontainers.image.title"="PHP-FPM 8.2-base"
LABEL "org.opencontainers.image.description"="PHP-FPM 8.2-base"


###
### Envs
###
ENV MY_USER="devilbox" \
MY_GROUP="devilbox" \
MY_UID="1000" \
MY_GID="1000" \
PHP_VERSION="8.2"


###
### User/Group
###
RUN set -eux \
&& groupadd -g ${MY_GID} -r ${MY_GROUP} \
&& useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}


###
### Upgrade (install ps)
###
RUN set -eux \
&& DEBIAN_FRONTEND=noninteractive apt-get update -q \
&& DEBIAN_FRONTEND=noninteractive apt-get install -q -y --no-install-recommends --no-install-suggests procps \
&& rm -rf /var/lib/apt/lists/*


###
### Configure
###
RUN set -eux \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /usr/local/etc/php-fpm.d \
&& mkdir -p /var/lib/php/session \
&& mkdir -p /var/lib/php/wsdlcache \
&& chown -R devilbox:devilbox /var/lib/php/session \
&& chown -R devilbox:devilbox /var/lib/php/wsdlcache


###
### Copy files
###
COPY ./data/php-ini.d/php-8.2.ini /usr/local/etc/php/conf.d/xxx-devilbox-default-php.ini
COPY ./data/php-fpm.conf/php-fpm-8.2.conf /usr/local/etc/php-fpm.conf

COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh
COPY ./data/docker-entrypoint.d /docker-entrypoint.d


###
### Verify
###
RUN set -eux \
&& echo "date.timezone=UTC" > /usr/local/etc/php/php.ini \
&& php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^8.2' \
&& /usr/local/sbin/php-fpm --test \
\
&& PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
&& PHP_ERROR="$( php -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi \
\
&& PHP_FPM_ERROR="$( php-fpm -v 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& PHP_FPM_ERROR="$( php-fpm -i 2>&1 1>/dev/null )" \
&& if [ -n "${PHP_FPM_ERROR}" ]; then echo "${PHP_FPM_ERROR}"; false; fi \
&& rm -f /usr/local/etc/php/php.ini


###
### Ports
###
EXPOSE 9000


###
### Entrypoint
###
CMD ["/usr/local/sbin/php-fpm"]
ENTRYPOINT ["/docker-entrypoint.sh"]
134 changes: 134 additions & 0 deletions Dockerfiles/base/data/php-fpm.conf/php-fpm-8.2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
; ################################################################################
; ####
; #### The following settings can be overwritten by later includes
; ####
; ################################################################################


; ############################################################
; Timeouts
; ############################################################

[www]
; The timeout for serving a single request after which the worker process will be killed.
; This option should be used when the 'max_execution_time' ini option does not stop script
; execution for some reason.
request_terminate_timeout = 120s


; ############################################################
; Logging
; ############################################################

[global]
error_log = /proc/self/fd/2
log_level = notice

[www]
; if we send this to /proc/self/fd/1, it never appears
access.log = /proc/self/fd/2


; ############################################################
; Backlog configuration
; ############################################################

[www]
; A maximum of backlog incoming connections will be queued for processing.
; If a connection request arrives with the queue full the client may receive an error with an
; indication of ECONNREFUSED, or, if the underlying protocol supports retransmission,
; the request may be ignored so that retries may succeed.

; This should not be greater than `cat /proc/sys/net/core/somaxconn`, otherwise connections
; are silently truncated
listen.backlog = 1024


; ############################################################
; Worker configuration
; ############################################################

[www]
; static - the number of child processes is fixed (pm.max_children).
;
; dynamic - the number of child processes is set dynamically based on the following directives:
; pm.max_children, pm.start_servers, pm.min_spare_servers, pm.max_spare_servers.
;
; ondemand - the processes spawn on demand (when requested, as opposed to dynamic, where
; pm.start_servers are started when the service is started.
pm = ondemand

; The maximum number of child processes to be created
pm.max_children = 50

; The number of child processes created on startup. Used only when pm is set to dynamic.
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2.
pm.start_servers = 4

; The desired minimum number of idle server processes.
pm.min_spare_servers = 2

; The desired maximum number of idle server processes.
pm.max_spare_servers = 6

; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries.
; For endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default value: 0.
pm.max_requests = 500

; The number of seconds after which an idle process will be killed. Used only when pm is set to ondemand
pm.process_idle_timeout = 10s


; ############################################################
; Include
; ############################################################


[global]
include = /usr/local/etc/php-fpm.d/*.conf


; ################################################################################
; ####
; #### The following settings overwrite any includes again
; ####
; ################################################################################


; ############################################################
; Required for Dockerization
; ############################################################

[global]
daemonize = no

[www]
; Keep env variables set by docker
clear_env = no

; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
catch_workers_output = yes


; ############################################################
; User and Group
; ############################################################

[www]
user = devilbox
group = devilbox


; ############################################################
; Networking
; ############################################################

[www]
; Ensure to listen here
listen = 9000
48 changes: 48 additions & 0 deletions Dockerfiles/base/data/php-ini.d/php-8.2.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
; ############################################################
; # Devilbox PHP defaults for 8.2-base
; ############################################################

; Each PHP flavour (base, mods, prod, work) might have its own php.ini.
; If none is present, the one from the previous flavour is inherited.


[PHP]

; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit = 512M


; Timeouts
max_execution_time = 120
max_input_time = 120


; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20


; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64


; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = Off
display_startup_errors = Off
log_errors = On
html_errors = Off


; Xdebug settings
xdebug.mode = Off
xdebug.start_with_request = default
xdebug.client_port = 9000
Loading

0 comments on commit f0b758e

Please sign in to comment.