Skip to content

Commit 6eada2c

Browse files
committed
feat: 支持 php8.3
1 parent 53e8e81 commit 6eada2c

8 files changed

Lines changed: 2017 additions & 3 deletions

File tree

.bash_aliases.example

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ tosource() {
3030

3131
tophp() {
3232
if [[ $# -lt 1 ]]; then
33-
local version=php82
33+
local version=php83
3434
else
3535
local version=$1
3636
fi
@@ -44,6 +44,7 @@ tophp() {
4444
sudo docker compose -f "${DPE_COMPOSE}" exec -u $(id -u):$(id -g) -w "${workdir}" "${version}" bash
4545
}
4646

47+
alias tophp83='tophp php83'
4748
alias tophp82='tophp php82'
4849
alias tophp81='tophp php81'
4950
alias tophp80='tophp php80'
@@ -87,13 +88,14 @@ php() {
8788
version=$1
8889
params=${@:2}
8990
else
90-
version=php82
91+
version=php83
9192
params=$@
9293
fi
9394

9495
sudo docker compose -f "${DPE_COMPOSE}" exec -u $(id -u):$(id -g) -w "${workdir}" "${version}" php ${params}
9596
}
9697

98+
alias php83='php php83'
9799
alias php82='php php82'
98100
alias php81='php php81'
99101
alias php80='php php80'
@@ -114,13 +116,14 @@ composer() {
114116
version=$1
115117
params=${@:2}
116118
else
117-
version=php82
119+
version=php83
118120
params=$@
119121
fi
120122

121123
sudo docker compose -f "${DPE_COMPOSE}" exec -u $(id -u):$(id -g) -w "${workdir}" "${version}" composer ${params}
122124
}
123125

126+
alias composer83='composer php83'
124127
alias composer82='composer php82'
125128
alias composer81='composer php81'
126129
alias composer80='composer php80'

docker-compose.yml.example

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,34 @@ services:
122122
max-size: "10m"
123123
max-file: "1"
124124

125+
php83:
126+
image: suyar/php:8.3-integration
127+
environment:
128+
TZ: ${TZ}
129+
COMPOSER_ALLOW_SUPERUSER: 1
130+
COMPOSER_MEMORY_LIMIT: -1
131+
COMPOSER_HOME: /tmp/composer
132+
volumes:
133+
- ${DIR_SERVICES}/php/83/php.ini:/usr/local/etc/php/php.ini
134+
- ${DIR_SERVICES}/php/83/php-fpm.conf:/usr/local/etc/php-fpm.d/zz-custom.conf
135+
- ${DIR_SERVICES}/php/83/supervisor.conf:/etc/supervisor/conf.d/service.conf
136+
- ${DIR_DATA}/composer:/tmp/composer
137+
- ${DIR_LOGS}/php/83/supervisor:/var/log/supervisor
138+
- ${DIR_LOGS}/php/83/log:/var/log/php
139+
- ${DIR_SOURCE}:/www
140+
working_dir: /www
141+
hostname: php83
142+
cap_add:
143+
- SYS_PTRACE
144+
networks:
145+
- default
146+
restart: unless-stopped
147+
logging:
148+
driver: "json-file"
149+
options:
150+
max-size: "10m"
151+
max-file: "1"
152+
125153
php82:
126154
image: suyar/php:8.2-integration
127155
environment:

dpe.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ LOGS_DIRS=(
3434
php/81/supervisor
3535
php/82/log
3636
php/82/supervisor
37+
php/83/log
38+
php/83/supervisor
3739
rabbitmq
3840
)
3941

logs/php/83/log/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

logs/php/83/supervisor/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

services/php/83/php-fpm.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
; 此文件会和默认的 /usr/local/etc/php-fpm.d/www.conf 进行 mixins
2+
[www]
3+
slowlog = /var/log/php/fpm_slow.log
4+
request_slowlog_timeout = 5s

0 commit comments

Comments
 (0)