#tradewind:update php8.3 pecl
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -2,4 +2,6 @@
|
|||||||
*.iml
|
*.iml
|
||||||
log
|
log
|
||||||
.env
|
.env
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.vscode
|
||||||
|
data
|
||||||
|
|||||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"augment.advanced": {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
32
README.md
32
README.md
@@ -82,6 +82,38 @@ docker-compose restart [服务名]
|
|||||||
docker-compose down
|
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端口未被占用
|
1. 确保本地80、3306、6379端口未被占用
|
||||||
|
|||||||
@@ -5,17 +5,34 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./nginx/
|
context: ./nginx/
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
ports:
|
network_mode: host
|
||||||
- "80:80"
|
|
||||||
networks:
|
|
||||||
- server
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||||
- ./nginx/sources.list:/etc/apt/sources.list
|
- ./nginx/sources.list:/etc/apt/sources.list
|
||||||
- ${LOCAL_CODE_ROOT}:/var/www/http
|
- /var/www:/var/www
|
||||||
- ./log/nginx:/var/log/nginx
|
- ./log/nginx:/var/log/nginx
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
restart: always
|
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:
|
php71:
|
||||||
build:
|
build:
|
||||||
context: ./php7.1/
|
context: ./php7.1/
|
||||||
@@ -67,6 +84,10 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: root
|
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
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
# platform: linux/amd64 # apple silicon
|
# platform: linux/amd64 # apple silicon
|
||||||
networks:
|
networks:
|
||||||
@@ -81,6 +102,10 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: root
|
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
|
command: --default-authentication-plugin=mysql_native_password
|
||||||
networks:
|
networks:
|
||||||
- server
|
- server
|
||||||
@@ -123,4 +148,4 @@ services:
|
|||||||
ipc: host
|
ipc: host
|
||||||
container_name: node
|
container_name: node
|
||||||
networks:
|
networks:
|
||||||
server:
|
server:
|
||||||
|
|||||||
BIN
php8.3/composer.phar
Normal file
BIN
php8.3/composer.phar
Normal file
Binary file not shown.
@@ -1,5 +1,10 @@
|
|||||||
FROM php:8.3-fpm
|
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 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 \
|
RUN apt-get update && apt-get install -y \
|
||||||
@@ -12,7 +17,8 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libfreetype6-dev \
|
libfreetype6-dev \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
libjpeg62-turbo-dev \
|
libssl-dev \
|
||||||
|
librdkafka-dev \
|
||||||
&& docker-php-ext-configure intl \
|
&& docker-php-ext-configure intl \
|
||||||
&& docker-php-ext-configure pcntl --enable-pcntl \
|
&& docker-php-ext-configure pcntl --enable-pcntl \
|
||||||
&& docker-php-ext-install -j$(nproc) \
|
&& docker-php-ext-install -j$(nproc) \
|
||||||
@@ -27,11 +33,14 @@ RUN apt-get update && apt-get install -y \
|
|||||||
soap \
|
soap \
|
||||||
pcntl \
|
pcntl \
|
||||||
&& pecl install \
|
&& pecl install \
|
||||||
redis \
|
/tmp/redis.tgz \
|
||||||
xdebug \
|
/tmp/xdebug.tgz \
|
||||||
|
/tmp/rdkafka.tgz \
|
||||||
&& docker-php-ext-enable \
|
&& docker-php-ext-enable \
|
||||||
redis \
|
redis \
|
||||||
xdebug \
|
xdebug \
|
||||||
|
rdkafka \
|
||||||
|
&& rm -f /tmp/redis.tgz /tmp/xdebug.tgz \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& apt-get autoclean
|
&& apt-get autoclean
|
||||||
|
|
||||||
|
|||||||
BIN
php8.3/rdkafka-6.0.5.tgz
Normal file
BIN
php8.3/rdkafka-6.0.5.tgz
Normal file
Binary file not shown.
BIN
php8.3/redis-6.0.2.tgz
Normal file
BIN
php8.3/redis-6.0.2.tgz
Normal file
Binary file not shown.
BIN
php8.3/xdebug-3.4.3.tgz
Normal file
BIN
php8.3/xdebug-3.4.3.tgz
Normal file
Binary file not shown.
Reference in New Issue
Block a user