v1.0.51: 部署配套 - ①config/database.php 支持 env 注入(DB_HOST/PORT/NAME/USER/PASS/CHARSET,缺省回落本地开发);②新增sql/schema_v1.0.51_base.sql全量业务库基准schema(仓库原仅增量迁移,27表按代码反推重建,含source_channels种子);③新增deploy/容器化编排(php8.2-fpm+nginx+mysql8.0,web暴露宿主8081,DB仅内网,对齐license_server既有compose风格):Dockerfile/nginx/default.conf/mysql初始化(01导入基准+字典/02种子超管角色与admin账号及12个迁移版本标记)/.env.example;④.gitignore防护.env与运行产物. 已在服务器106.55.169.92用一次性mysql:8.0容器验证:27表+字典(3632区域/12来源渠道)+admin/超管+cert版本标记全部导入成功
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /var/www/html;
|
||||
index index.html;
|
||||
|
||||
charset utf-8;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
|
||||
client_max_body_size 200m;
|
||||
server_tokens off;
|
||||
|
||||
# 禁止点开隐藏文件/目录及运行日志
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# 静态资源长缓存(uploads/css/js/libs)
|
||||
location ~* \.(?:css|js|png|jpg|jpeg|gif|svg|ico|woff2?)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# 上传目录允许写入(由 php-fpm 侧保证写入者权限)
|
||||
location /static/uploads {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# PHP 交给 php-fpm
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_read_timeout 300;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
}
|
||||
|
||||
# 其余静态页面
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
error_page 404 =404 /index.html;
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript image/svg+xml;
|
||||
}
|
||||
Reference in New Issue
Block a user