Skip to content

Commit d7a314b

Browse files
committed
1.1.26
删除预配置
1 parent 4167458 commit d7a314b

11 files changed

Lines changed: 51 additions & 687 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ RUN apk add --no-cache \
3636
# Configure all services for better caching
3737
ENV PHP_INI_DIR=/etc/php84
3838

39-
# Copy configuration templates and presets
39+
# Copy configuration templates and scripts
4040
COPY config/templates /etc/nginx-config-templates/
41-
COPY config/presets /etc/nginx-config-presets/
4241
COPY config/scripts /etc/nginx-config-scripts/
4342

4443
# Copy nginx configuration (default/fallback)
@@ -61,7 +60,8 @@ RUN ln -sf /etc/supervisor/conf.d/supervisord.conf /etc/supervisord.conf
6160
RUN chown -R nobody:nobody /var/www/html /run /var/lib/nginx /var/log/nginx && \
6261
mkdir -p /run/supervisor && \
6362
chown -R nobody:nobody /run/supervisor && \
64-
chown -R nobody:nobody /etc/nginx-config-templates /etc/nginx-config-presets /etc/nginx-config-scripts
63+
chown -R nobody:nobody /etc/nginx-config-templates /etc/nginx-config-scripts && \
64+
chown -R nobody:nobody /etc/php84 /etc/nginx /etc/redis.conf
6565

6666
# Make configuration generation script executable (after changing ownership)
6767
RUN chmod +x /etc/nginx-config-scripts/generate-config.sh /etc/nginx-config-scripts/start.sh

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,23 @@ services:
7777
docker-compose up -d
7878
```
7979

80-
### 多资源配置支持
80+
### 动态配置支持
8181

82-
容器现在支持多种VPS配置的自动优化,从1H512M到2H4G
82+
容器支持通过环境变量动态配置各种参数
8383

8484
```bash
85-
# 使用预设配置
86-
docker run -p 80:8080 -e RESOURCE_PROFILE=1h1g zhoujie218/php-nginx
87-
88-
# 支持的配置:1h512m, 1h1g, 1h2g, 2h2g, 2h4g
85+
# 自定义配置
86+
docker run -p 80:8080 \
87+
-e PHP_MEMORY_LIMIT=128M \
88+
-e OPCACHE_MEMORY=64 \
89+
-e REDIS_MAXMEMORY=128mb \
90+
zhoujie218/php-nginx
8991
```
9092

9193
### 环境变量配置
9294

9395
| 变量名 | 默认值 | 说明 |
9496
|--------|--------|------|
95-
| `RESOURCE_PROFILE` | `1h512m` | 资源配置预设 |
9697
| `PHP_MEMORY_LIMIT` | 64M | PHP内存限制 |
9798
| `OPCACHE_MEMORY` | 32 | OPcache内存大小(MB) |
9899
| `REDIS_MAXMEMORY` | 64mb | Redis最大内存 |
@@ -158,7 +159,7 @@ GET /admin.php
158159
* [🚀 部署指南](docs/部署指南.md) - 工作流触发、版本管理、镜像使用
159160
* [📖 项目指南](docs/项目指南.md) - 贡献指南、开发指南、代码规范
160161
* [💡 使用示例](docs/使用示例.md) - 实际应用场景、最佳实践、故障恢复
161-
* [⚙️ 多资源配置指南](docs/多资源配置指南.md) - 不同VPS配置的优化方案
162+
* [⚙️ 动态配置指南](docs/多资源配置指南.md) - 环境变量配置优化方案
162163

163164

164165

config/presets/1h1g/env

Lines changed: 0 additions & 64 deletions
This file was deleted.

config/presets/1h2g/env

Lines changed: 0 additions & 64 deletions
This file was deleted.

config/presets/1h512m/env

Lines changed: 0 additions & 64 deletions
This file was deleted.

config/presets/2h2g/env

Lines changed: 0 additions & 64 deletions
This file was deleted.

config/presets/2h4g/env

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)