liquidlight/deployer-typo3-ci
Composer 安装命令:
composer require liquidlight/deployer-typo3-ci
包简介
TYPO3 deployment via CI
README 文档
README
This package is used by Liquid Light to deploy TYPO3 websites via CI - specifically Gitlab.
It is best used within Gitlab CI as it can utilise several environment variables.
The basis for this is PHP Deployer, however a lot of functionality comes from deployer-extended-typo3 and it's many meta-packages.
Options
There are several settings defined by default within this package for the most common hosts.
Hosts
Set the hostname of the server in the deploy.php file - the rest of the connection details should be in your .ssh/config file
host('production') ->set('hostname', 'client.xxx') ;
Existing Hosts
The following hosts have a config file in the deployer/hosts file with some sensible defaults
- production
- staging
- local
Clearing OPCache
If the server has OPCache installed, it will need to be cleared on each deployment to allow PHP and Apache to see the new symlinks.
To do this, you need to declare an array in public_urls in the deploy file, along with adding the cache:clear_php_http task for the environment.
- Add
->set('public_urls', ['[URL]'])to theproductionhost indeploy.php - Add the
cache:clear_php_httptask for production instances (example below)
on(select('instance=production'), function ($host) { after('cache:clear_php_cli', 'cache:clear_php_http'); });
Pushing the database
Pushing the database to live is prohibited, however there are some cases where this needs to be done.
To allow this, add the following to your local deploy.php file
set('db_allow_push_live', true);
Common settings
VPS
Configuration
Add the following settings if not set (and adjust if necessary). They can be set globally or chained to the host (e.g. ->set('writable_use_sudo', true))
set('writable_use_sudo', true); set('cleanup_use_sudo', true); set('writable_mode', 'chgrp'); set('http_group', 'www-data');
Additional tasks
deploy:vps:writable
Add an extra post-deploy task to reset permissions and reboot PHP if needed
after('typo3:cache:flush:pages', 'deploy:vps:writable');
service:php_fpm_reload
Add PHP reloading to set the correct version as documented in deployer-extended
Upgrading
v2 -> v3
As well as removing some functionality, the v3 upgrade requires some changes to the deploy.php file
- In
deploy.php, update the require location & class invocation
<?php namespace Deployer; require_once './vendor/autoload.php'; new \LiquidLight\Deployer\Loader();
- Review each environment and remove the
ll_deployer_environmentdeclaration - this doesn't add any tasks or configuration any more- Note: If it was set to
vpsthen follow the Common settings -> VPS steps above
- Note: If it was set to
liquidlight/deployer-typo3-ci 适用场景与选型建议
liquidlight/deployer-typo3-ci 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.71k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 11 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 liquidlight/deployer-typo3-ci 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 liquidlight/deployer-typo3-ci 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2023-11-17