Skip to content

Commit 686e986

Browse files
committed
add support of PHP 8.5
1 parent aa5057e commit 686e986

9 files changed

Lines changed: 147 additions & 12 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
- name: Create site.test dir and php-file
1515
run: mkdir -p projects/site.test && echo '<?php echo phpversion();' > projects/site.test/index.php
1616

17-
- name: Build the stack PHP-84 and hack with default.conf
18-
run: cp mysql.env.example mysql.env && cp docker/nginx/config/templates/site.test.conf-php-84 docker/nginx/config/default.conf && sed -i 's/server_name site.test/server_name _/g' docker/nginx/config/default.conf && cp templates/docker-compose-php-84.yml docker-compose.yml && make upb
17+
- name: Build the stack PHP-85 and hack with default.conf
18+
run: cp mysql.env.example mysql.env && cp docker/nginx/config/templates/site.test.conf-php-85 docker/nginx/config/default.conf && sed -i 's/server_name site.test/server_name _/g' docker/nginx/config/default.conf && cp templates/docker-compose-php-85.yml docker-compose.yml && make upb
1919

2020
- name: Test DB
2121
run: sleep 15 && docker run --network container:docker-compose-php-nginx-1 rhamdeew/telnet db 3306
@@ -34,6 +34,16 @@ jobs:
3434
- name: Test mysqltuner
3535
run: docker compose -f docker-compose.mysqltuner.yml run --rm mysqltuner /opt/mysqltuner --help | grep 'MySQLTuner'
3636

37+
- name: Test PHP-FPM
38+
run: docker run --network container:docker-compose-php-nginx-1 rhamdeew/telnet php-85 9000
39+
- name: Test Nginx localhost
40+
run: docker run --network container:docker-compose-php-nginx-1 appropriate/curl -s --retry 1 --retry-connrefused http://super:demo@localhost/ | grep '8.5'
41+
- name: Stop containers
42+
run: make st
43+
44+
45+
- name: Build the stack PHP-84 and hack with default.conf
46+
run: cp mysql.env.example mysql.env && cp docker/nginx/config/templates/site.test.conf-php-84 docker/nginx/config/default.conf && sed -i 's/server_name site.test/server_name _/g' docker/nginx/config/default.conf && cp templates/docker-compose-php-84.yml docker-compose.yml && make upb
3747
- name: Test PHP-FPM
3848
run: docker run --network container:docker-compose-php-nginx-1 rhamdeew/telnet php-84 9000
3949
- name: Test Nginx localhost

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66

77
### Supported PHP versions
88

9-
- PHP-FPM 8.4.11
10-
- PHP-FPM 8.3.24
11-
- PHP-FPM 8.2.29
12-
- PHP-FPM 8.1.33
9+
- PHP-FPM 8.5.2
10+
- PHP-FPM 8.4.17
11+
- PHP-FPM 8.3.30
12+
- PHP-FPM 8.2.30
13+
- PHP-FPM 8.1.34
1314
- PHP-FPM 8.0.30
1415
- PHP-FPM 7.4.33
15-
- Apache 2 + PHP 8.1.33
16+
- Apache 2 + PHP 8.1.34
1617
- Apache 2 + PHP 7.4.33
1718
- Apache 2 + PHP 5.6.40
1819

README_ru.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66

77
### Поддерживаемые версии PHP
88

9-
- PHP-FPM 8.4.11
10-
- PHP-FPM 8.3.24
11-
- PHP-FPM 8.2.29
12-
- PHP-FPM 8.1.33
9+
- PHP-FPM 8.5.2
10+
- PHP-FPM 8.4.17
11+
- PHP-FPM 8.3.30
12+
- PHP-FPM 8.2.30
13+
- PHP-FPM 8.1.34
1314
- PHP-FPM 8.0.30
1415
- PHP-FPM 7.4.33
15-
- Apache 2 + PHP 8.1.33
16+
- Apache 2 + PHP 8.1.34
1617
- Apache 2 + PHP 7.4.33
1718
- Apache 2 + PHP 5.6.40
1819

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
server {
2+
listen 80;
3+
4+
# server name:
5+
server_name site.test;
6+
7+
# root directory
8+
root /srv/projects/site.test;
9+
include conf.d/includes/restrictions.inc;
10+
11+
satisfy any;
12+
allow 192.168.1.0/24;
13+
deny all;
14+
auth_basic "Restricted";
15+
auth_basic_user_file .htpasswd;
16+
17+
######################################
18+
# FPM config
19+
######################################
20+
location ~ \.php$ {
21+
try_files $uri = 404;
22+
include fastcgi_params;
23+
fastcgi_pass php-85:9000;
24+
fastcgi_index index.php;
25+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
26+
fastcgi_param SERVER_NAME $host;
27+
}
28+
29+
location / {
30+
index index.php index.html index.htm;
31+
try_files $uri $uri/ /index.php?$args;
32+
}
33+
34+
include conf.d/includes/assets.inc;
35+
}

docker/php-85/build/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM rhamdeew/docker-php-85-fpm-alpine
2+
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data

docker/php-85/config/msmtprc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
account mailpit
2+
host mailpit
3+
port 1025
4+
from test@example.com

docker/php-85/config/php.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
date.timezone = "Europe/Moscow"
2+
display_errors = On
3+
sendmail_path = "/usr/bin/msmtp -a mailpit -t"
4+
5+
post_max_size = 20M
6+
upload_max_filesize=20M

docker/php-85/config/www.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[www]
2+
3+
user = www-data
4+
group = www-data
5+
6+
listen = 127.0.0.1:9000
7+
8+
pm = dynamic
9+
pm.max_children = 5
10+
pm.start_servers = 2
11+
pm.min_spare_servers = 1
12+
pm.max_spare_servers = 3
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
version: '3.4'
2+
x-logging:
3+
&default-logging
4+
driver: "json-file"
5+
options:
6+
max-file: "5"
7+
max-size: "20m"
8+
9+
services:
10+
11+
mailpit:
12+
image: axllent/mailpit
13+
restart: unless-stopped
14+
#ports:
15+
# - '127.0.0.1:1025:1025'
16+
logging: *default-logging
17+
18+
db:
19+
image: mariadb
20+
restart: unless-stopped
21+
env_file:
22+
- mysql.env
23+
volumes:
24+
# - ./docker/mariadb/config:/etc/mysql/conf.d:ro
25+
- ./db/data:/var/lib/mysql
26+
#ports:
27+
# - '127.0.0.1:3306:3306'
28+
logging: *default-logging
29+
30+
nginx:
31+
build: ./docker/nginx/build
32+
image: nginx
33+
restart: unless-stopped
34+
volumes:
35+
- ./docker/nginx/.htpasswd:/etc/nginx/.htpasswd:ro
36+
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
37+
- ./docker/nginx/config:/etc/nginx/conf.d:ro
38+
- ./projects:/srv/projects
39+
- ./docker/nginx/acme-challenge:/usr/share/nginx/html:ro
40+
# - ./docker/nginx/ssl:/etc/nginx/ssl:ro
41+
ports:
42+
- "80:80"
43+
# -"443:443"
44+
- "8025:8025"
45+
- "8080:8080"
46+
logging: *default-logging
47+
48+
adminer:
49+
image: adminer
50+
restart: unless-stopped
51+
52+
php-85:
53+
build: ./docker/php-85/build
54+
image: php-85
55+
restart: unless-stopped
56+
env_file:
57+
- mysql.env
58+
volumes:
59+
- ./docker/php-85/config/msmtprc:/etc/msmtprc:ro
60+
- ./docker/php-85/config/php.ini:/usr/local/etc/php/conf.d/my.ini:ro
61+
- ./docker/php-85/config/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
62+
- ./docker/php-85/composer/:/root/.composer/
63+
- ./projects/:/srv/projects/
64+
logging: *default-logging

0 commit comments

Comments
 (0)