#tradewind:update php8.3 pecl

This commit is contained in:
2025-12-26 14:40:38 +08:00
parent 5f745cb208
commit e818f9a71d
9 changed files with 83 additions and 10 deletions

4
.gitignore vendored
View File

@@ -2,4 +2,6 @@
*.iml
log
.env
.DS_Store
.DS_Store
.vscode
data

5
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"augment.advanced": {
}
}

View File

@@ -82,6 +82,38 @@ docker-compose restart [服务名]
docker-compose down
```
## 故障排除
### Laravel权限问题
如果遇到Laravel日志文件权限错误执行以下步骤
1. **重新构建PHP容器**已配置用户ID匹配
```bash
docker-compose build php83
docker-compose up -d php83
```
2. **设置Laravel目录权限**
```bash
# 进入PHP容器
docker exec -it php83 bash
# 设置storage和cache目录权限
chown -R www-data:www-data /var/www/mono-be/storage
chown -R www-data:www-data /var/www/mono-be/bootstrap/cache
chmod -R 775 /var/www/mono-be/storage
chmod -R 775 /var/www/mono-be/bootstrap/cache
```
3. **或者在宿主机直接设置**
```bash
# 在WSL中执行
sudo chown -R 1000:1000 /path/to/mono-be/storage
sudo chown -R 1000:1000 /path/to/mono-be/bootstrap/cache
chmod -R 775 /path/to/mono-be/storage
chmod -R 775 /path/to/mono-be/bootstrap/cache
```
## 注意事项
1. 确保本地80、3306、6379端口未被占用

View File

@@ -5,17 +5,34 @@ services:
build:
context: ./nginx/
dockerfile: dockerfile
ports:
- "80:80"
networks:
- server
network_mode: host
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/sources.list:/etc/apt/sources.list
- ${LOCAL_CODE_ROOT}:/var/www/http
- /var/www:/var/www
- ./log/nginx:/var/log/nginx
container_name: nginx
restart: always
profiles:
- nginx-host
nginx-bridge:
build:
context: ./nginx/
dockerfile: dockerfile
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/sources.list:/etc/apt/sources.list
- /var/www:/var/www
- ./log/nginx:/var/log/nginx
container_name: nginx
restart: always
networks:
- server
ports:
- "80:80"
- "443:443"
profiles:
- nginx-bridge
php71:
build:
context: ./php7.1/
@@ -67,6 +84,10 @@ services:
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
TZ: Asia/Shanghai
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mysql:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password
# platform: linux/amd64 # apple silicon
networks:
@@ -81,6 +102,10 @@ services:
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
TZ: Asia/Shanghai
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mysql8:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password
networks:
- server
@@ -123,4 +148,4 @@ services:
ipc: host
container_name: node
networks:
server:
server:

BIN
php8.3/composer.phar Normal file

Binary file not shown.

View File

@@ -1,5 +1,10 @@
FROM php:8.3-fpm
COPY redis-6.0.2.tgz /tmp/redis.tgz
COPY xdebug-3.4.3.tgz /tmp/xdebug.tgz
COPY rdkafka-6.0.5.tgz /tmp/rdkafka.tgz
COPY composer.phar /usr/local/bin/composer
RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list.d/debian.sources
RUN apt-get update && apt-get install -y \
@@ -12,7 +17,8 @@ RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libxml2-dev \
libicu-dev \
libjpeg62-turbo-dev \
libssl-dev \
librdkafka-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-configure pcntl --enable-pcntl \
&& docker-php-ext-install -j$(nproc) \
@@ -27,11 +33,14 @@ RUN apt-get update && apt-get install -y \
soap \
pcntl \
&& pecl install \
redis \
xdebug \
/tmp/redis.tgz \
/tmp/xdebug.tgz \
/tmp/rdkafka.tgz \
&& docker-php-ext-enable \
redis \
xdebug \
rdkafka \
&& rm -f /tmp/redis.tgz /tmp/xdebug.tgz \
&& apt-get clean \
&& apt-get autoclean

BIN
php8.3/rdkafka-6.0.5.tgz Normal file

Binary file not shown.

BIN
php8.3/redis-6.0.2.tgz Normal file

Binary file not shown.

BIN
php8.3/xdebug-3.4.3.tgz Normal file

Binary file not shown.