Skip to content

Commit 13c11e3

Browse files
committed
Upgrade to php8.4, new php ini file, new restart rule
1 parent 2717e55 commit 13c11e3

File tree

10 files changed

+40
-1961
lines changed

10 files changed

+40
-1961
lines changed

.docker/compose/base-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ services:
2626
- "8080:8080"
2727
volumes:
2828
- /var/run/docker.sock:/var/run/docker.sock:ro
29-
restart: unless-stopped
29+
restart: ${RESTART_POLICY:-on-failure}
3030
networks:
3131
- sfdemo
3232

.docker/compose/base.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
- ../../project:/var/www/project/demo
1818
- ../nginx/nginx.conf:/etc/nginx/nginx.conf
1919
- ../nginx/sites:/etc/nginx/sites-enabled
20-
restart: unless-stopped
20+
restart: ${RESTART_POLICY:-on-failure}
2121
depends_on:
2222
- php
2323
networks:
@@ -28,7 +28,7 @@ services:
2828
db:
2929
image: mysql:8
3030
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
31-
restart: unless-stopped
31+
restart: ${RESTART_POLICY:-on-failure}
3232
environment:
3333
MYSQL_ROOT_PASSWORD: ${DB_PASS}
3434
MYSQL_DATABASE: ${DB_NAME}
@@ -42,7 +42,7 @@ services:
4242

4343
php:
4444
build: ../php
45-
restart: unless-stopped
45+
restart: ${RESTART_POLICY:-on-failure}
4646
environment:
4747
MYSQL_HOST: ${DB_HOST}
4848
MYSQL_USER: ${DB_USER}

.docker/compose/docker.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ DB_NAME=demo
1414
DB_USER=local
1515
DB_PASS=local
1616
TIMEZONE=Europe/Paris
17+
18+
# For active docker container's on server boot
19+
# RESTART_POLICY=unless-stopped

.docker/compose/maildev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ services:
88
ports:
99
- "1080"
1010
- "1025"
11+
restart: ${RESTART_POLICY:-on-failure}
1112
networks:
1213
sfdemo:
1314
aliases:

.docker/compose/phpmyadmin.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
- db
2121
links:
2222
- db
23+
restart: ${RESTART_POLICY:-on-failure}
2324
networks:
2425
sfdemo:
2526
aliases:

.docker/php/98-xdebug.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
xdebug.mode=debug,develop
2+
xdebug.client_host=host.docker.internal
3+
xdebug.client_port=9000

.docker/php/99-custom-php-conf.ini

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
date.timezone = "Europe/Paris"
2+
memory_limit = 512M
3+
max_execution_time = 30
4+
upload_max_filesize = 512M
5+
post_max_size = 512M
6+
opcache.enable = On
7+
opcache.validate_timestamps = Off
8+
opcache.memory_consumption = 32
9+
expose_php = Off
10+
log_errors = On
11+
log_errors_max_len = 0
12+
max_input_vars = 10000
13+
14+
; Log on file or Docker
15+
; error_log = /var/log/php-error.log
16+
error_log = /dev/stderr
17+
18+
; Development
19+
display_errors = On
20+
error_reporting = E_ALL
21+
22+
; Production
23+
; display_errors = Off
24+
; error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

.docker/php/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.2-fpm
1+
FROM php:8.4-fpm
22
MAINTAINER J.GAUTHI <github.com/jgauthi>
33

44
# Some libs
@@ -24,7 +24,8 @@ RUN chown -R www-data:www-data /var/www
2424

2525
# PHP Conf
2626
COPY php.ini /usr/local/etc/php/php.ini
27-
COPY php-fpm-pool.conf /usr/local/etc/php/php-fpm.conf
27+
COPY 98-xdebug.ini $PHP_INI_DIR/conf.d/98-xdebug.ini
28+
COPY 99-custom-php-conf.ini $PHP_INI_DIR/conf.d/99-custom-php-conf.ini
2829

2930
# Purge
3031
RUN rm -rf /var/lib/apt/lists/* \

0 commit comments

Comments
 (0)