fix: speed up local Docker PHP APIs

This commit is contained in:
hajimi
2026-08-01 16:18:19 +08:00
parent 42284ba6ac
commit 9a83c8dfb7
6 changed files with 84 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
FROM registry.cn-guangzhou.aliyuncs.com/likeadmin/php:8.0.30.3-fpm
RUN docker-php-ext-install -j"$(nproc)" opcache
COPY docker/config/php/conf.d/zz-opcache.ini /usr/local/etc/php/conf.d/zz-opcache.ini
+9
View File
@@ -0,0 +1,9 @@
; Keep source changes immediately visible while avoiding repeated PHP compilation.
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
opcache.validate_timestamps=1
opcache.revalidate_freq=0
opcache.save_comments=1
+8 -2
View File
@@ -1,8 +1,14 @@
name: sport-era-dev
x-php-image: &php-image
image: sport-era-dev-php:local
build:
context: ..
dockerfile: docker/Dockerfile.php
services:
server:
image: registry.cn-guangzhou.aliyuncs.com/likeadmin/php:8.0.30.3-fpm
<<: *php-image
working_dir: /likeadmin_php/server
restart: unless-stopped
depends_on:
@@ -16,7 +22,7 @@ services:
- sport-era-dev
scheduler:
image: registry.cn-guangzhou.aliyuncs.com/likeadmin/php:8.0.30.3-fpm
<<: *php-image
working_dir: /likeadmin_php/server
restart: unless-stopped
depends_on: