Skip to content

Commit b550a15

Browse files
author
Hans Tuscher
committed
php 8.3
1 parent 77195db commit b550a15

File tree

386 files changed

+8140
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+8140
-59
lines changed

conf/console.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ dockerTest:
4343
OS_FAMILY: 'debian'
4444
OS_VERSION: '9'
4545
PHP_OFFICIAL: '1'
46+
'php:8:3$':
47+
OS_FAMILY: 'debian'
48+
OS_VERSION: '12'
49+
PHP_OFFICIAL: '1'
4650
'php[^:]*:[0-9]':
4751
OS_FAMILY: 'debian'
4852
OS_VERSION: '10'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#+++++++++++++++++++++++++++++++++++++++
2+
# Dockerfile for webdevops/php-apache-dev:8.3-alpine
3+
# -- automatically generated --
4+
#+++++++++++++++++++++++++++++++++++++++
5+
6+
FROM webdevops/php-apache:8.3-alpine
7+
8+
ENV WEB_DOCUMENT_ROOT=/app \
9+
WEB_DOCUMENT_INDEX=index.php \
10+
WEB_ALIAS_DOMAIN=*.vm \
11+
WEB_PHP_TIMEOUT=600 \
12+
WEB_PHP_SOCKET=""
13+
ENV WEB_PHP_SOCKET=127.0.0.1:9000
14+
ENV WEB_NO_CACHE_PATTERN="\.(css|js|gif|png|jpg|svg|json|xml)$"
15+
16+
COPY conf/ /opt/docker/
17+
18+
RUN set -x \
19+
# Install development environment
20+
&& bash -c "$(curl -L https://installer.blackfire.io/installer.sh)" \
21+
&& blackfire php:install \
22+
&& apk-install \
23+
linux-headers \
24+
make \
25+
autoconf \
26+
g++ \
27+
&& pecl install xdebug \
28+
&& apk del -f --purge \
29+
autoconf \
30+
linux-headers \
31+
g++ \
32+
make \
33+
&& docker-php-ext-enable xdebug \
34+
# Enable php development services
35+
&& docker-service enable syslog \
36+
&& docker-service enable postfix \
37+
&& docker-service enable ssh \
38+
&& docker-run-bootstrap \
39+
&& docker-image-cleanup
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{ docker.from("php-apache", "8.3-alpine") }}
2+
3+
{{ environment.web() }}
4+
{{ environment.webPhp() }}
5+
{{ environment.webDevelopment() }}
6+
7+
{{ docker.copy('conf/', '/opt/docker/') }}
8+
9+
RUN set -x \
10+
{{ php.officialDevelopmentAlpine(version="8.3") }} \
11+
{{ provision.runBootstrap() }} \
12+
{{ docker.cleanup() }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# placeholder
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
# Init vars
4+
if [[ -z "$SERVICE_BLACKFIRE_AGENT_OPTS" ]]; then SERVICE_BLACKFIRE_AGENT_OPTS=""; fi
5+
6+
source /opt/docker/bin/config.sh
7+
8+
BLACKFIRE_ARGS=""
9+
10+
includeScriptDir "/opt/docker/bin/service.d/syslog-ng.d/"
11+
12+
# blackfire.server_id
13+
if [[ -n "${BLACKFIRE_SERVER_ID+x}" ]]; then
14+
BLACKFIRE_ARGS="$BLACKFIRE_ARGS --server-id=\"${BLACKFIRE_SERVER_ID}\""
15+
fi
16+
17+
# blackfire.server_token
18+
if [[ -n "${BLACKFIRE_SERVER_TOKEN+x}" ]]; then
19+
BLACKFIRE_ARGS="$BLACKFIRE_ARGS --server-token=\"${BLACKFIRE_SERVER_TOKEN}\""
20+
fi
21+
22+
# create directory for unix socket
23+
mkdir -p /var/run/blackfire
24+
25+
eval exec blackfire-agent $BLACKFIRE_ARGS $SERVICE_BLACKFIRE_AGENT_OPTS
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# EnableSendfile: Control whether the sendfile kernel support is
2+
# used to deliver files (assuming that the OS supports it).
3+
# The default is on; turn this off if you serve from NFS-mounted
4+
# filesystems. Please see
5+
# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
6+
EnableSendfile off
7+
8+
LogLevel info

docker/php-apache-dev/8.3-alpine/conf/etc/httpd/vhost.common.d/.gitkeep

Whitespace-only changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<FilesMatch "<WEB_NO_CACHE_PATTERN>">
2+
FileETag None
3+
4+
<ifModule mod_headers.c>
5+
Header unset ETag
6+
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
7+
Header set Pragma "no-cache"
8+
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
9+
</ifModule>
10+
</FilesMatch>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[group:blackfire-agent]
2+
programs=blackfire-agentd
3+
priority=25
4+
5+
[program:blackfire-agentd]
6+
command = /opt/docker/bin/service.d/blackfire-agent.sh
7+
process_name=%(program_name)s
8+
startsecs = 0
9+
autostart = false
10+
autorestart = true
11+
stdout_logfile=/dev/stdout
12+
stdout_logfile_maxbytes=0
13+
stderr_logfile=/dev/stderr
14+
stderr_logfile_maxbytes=0
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
PHP_VERSION=$(php -r 'echo phpversion();' | cut -d '-' -f 1)
4+
5+
# Configure php-fpm
6+
go-replace --mode=lineinfile --regex \
7+
-s '^[\s;]*access.format[\s]*=' -r 'access.format = "%R - %u %t \"%m %r%Q%q\" %s %f cpu:%C%% mem:%{megabytes}M reqTime:%d"' \
8+
-- /opt/docker/etc/php/fpm/pool.d/application.conf
9+
10+
if [[ "$(version-compare "$PHP_VERSION" "5.5.999")" == "<" ]]; then
11+
# listen on public IPv4 port
12+
# no ipv6 sockets available for old php version
13+
go-replace --mode=line --regex \
14+
-s '^[\s;]*listen[\s]*=' -r 'listen = 0.0.0.0:9000' \
15+
-- /opt/docker/etc/php/fpm/pool.d/application.conf \
16+
/opt/docker/etc/php/fpm/php-fpm.conf
17+
else
18+
# listen on public IPv6 port
19+
go-replace --mode=line --regex \
20+
-s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \
21+
-- /opt/docker/etc/php/fpm/pool.d/application.conf \
22+
/opt/docker/etc/php/fpm/php-fpm.conf
23+
24+
fi

0 commit comments

Comments
 (0)