Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
1.2 KiB
1.2 KiB
部署与进程管理
Web
- nginx + php-fpm(或 Laravel Herd)
- 参考
deploy/nginx.conf - 附件:生产
ATTACHMENTS_DRIVER=s3;开发可用local
长驻进程(PM2)
配置文件:仓库根目录 ecosystem.config.cjs
# 建议 QUEUE_CONNECTION=redis,并先起 Redis
composer install --no-dev --optimize-autoloader
php artisan migrate --force
php artisan config:cache
php artisan route:cache
php artisan themes:publish
php artisan plugins:sync
pm2 start ecosystem.config.cjs
pm2 save
进程:
| name | 作用 |
|---|---|
larablog-queue |
queue:work(default / ai-content / ai-moderation) |
larablog-schedule |
schedule:work |
larablog-ai-workerman |
Workerman AI 运行时(可选,若只用 queue:work 可删) |
HTTP 不要交给 pm2。
GitHub Actions
.github/workflows/ci.yml:PHP 8.2/8.3 跑 PHPUnit(sqlite memory)deployjob 仅作占位,需绑定productionenvironment 与自有发布脚本
Redis 键前缀
.env:
REDIS_PREFIX=larablog_
CACHE_PREFIX=larablog_cache_
Laravel 会在 config/database.php → redis.options.prefix 与 cache prefix 生效。