sourcebroker/deployer-typo3-database
最新稳定版本:1.1.0
Composer 安装命令:
composer require sourcebroker/deployer-typo3-database
包简介
Database sync for TYPO3 with deployer-extended-database.
关键字:
README 文档
README
What does it do?
This package provides settings to use package sourcebroker/deployer-extended-database with TYPO3 CMS. It allows to sync database between instances.
Installation
-
Install package with composer:
composer require sourcebroker/deployer-typo3-database -
Put the following lines at the beginning of your
deploy.php:require_once(__DIR__ . '/vendor/autoload.php'); new \SourceBroker\DeployerLoader\Loader([ ['get' => 'sourcebroker/deployer-typo3-database'], ]);
-
On each instance create a
.env(or.env.local) file which should be out of git and have at leastINSTANCEwith the same name as defined forhost()indeploy.php. You can use this file also to store database credentials and any other settings that are different per instance. Example for.envfile:TYPO3_CONTEXT='Production' INSTANCE='production' TYPO3__DB__Connections__Default__dbname='t3base13_production' TYPO3__DB__Connections__Default__host='127.0.0.1' TYPO3__DB__Connections__Default__password='password' TYPO3__DB__Connections__Default__port='3306' TYPO3__DB__Connections__Default__user='t3base13_production'
If you want Deployer to get database data from TYPO3 directly instead of reading from
.envfile then set:set('driver_typo3cms', true);
As an alternative you can also not create any
.envfile but make sure that the env variableINSTANCEexists in the system at hosts defined in Deployer (and also at your local host). For example, at local ddev level you can define it in.ddev/config.yaml:web_environment: - INSTANCE=local
Synchronizing database
The command for synchronizing database from production database to local instance is:
dep db:pull production
The command for synchronizing database from production to staging is:
dep db:copy production --options=target:staging
Example of working configuration
This is an example of working configuration for TYPO3 13:
<?php namespace Deployer; require_once(__DIR__ . '/vendor/autoload.php'); new \SourceBroker\DeployerLoader\Loader([ ['get' => 'sourcebroker/deployer-typo3-database'], ]); host('production') ->setHostname('vm-dev.example.com') ->setRemoteUser('deploy') ->set('bin/php', '/usr/bin/php8.4'); ->set('deploy_path', '~/t3base13/production'); host('staging') ->setHostname('vm-dev.example.com') ->setRemoteUser('deploy') ->set('bin/php', '/usr/bin/php8.4'); ->set('deploy_path', '~/t3base13/staging');
Changelog
See CHANGELOG.rst
统计信息
- 总下载量: 8.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04