承接 joro/typo3reversedeployment 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

joro/typo3reversedeployment

最新稳定版本:v2.1.2

Composer 安装命令:

composer require joro/typo3reversedeployment

包简介

Export DB and files to your TYPO3 dev installation

README 文档

README

Features:

  • Export TYPO3 Database and download (exclude tables)
  • Download only referenced files to your local fileadmin
  • Download specific folders like ./uploads or download entire fileadmin

Requirements:

  • TYPO3 Console (>=4.6) on remote TYPO3 installation
  • A SSH connection to the remote server
  • rsync to download files
  • Works with TYPO3 7.x/8.x/9.x/10.x

⚠️ In version 2.0.0 ...->ssh('example.org'); changes to ...->setRemoteServer('example.org');

Security

Created temporary files should be protected from public access

Apache

The code will check for .htaccess file within typo3temp/joro_typo3reversedeployment and creates it as needed.

Example content:

 deny from all

NGINX

Add this to your NGINX configuration to disabled public access of temp files

location ~ /\.(?!joro_typo3reversedeployment).* {
    deny all;
}

Usage:

  1. Create a new file in folder .reverse, e.g. .reverse/remote.php
<?php

$reverseDeploy = new \JoRo\Typo3ReverseDeployment();

/**
 * Set server paths
 */
$reverseDeploy->setTypo3RootPath('/var/www/html/');
// optional: $reverseDeploy->setPhpPathAndBinary('/usr/local/bin/php_cli');

/**
 * Connect to Server
 */
$reverseDeploy->setUser('USERNAME');
$reverseDeploy->setRemoteServer('example.org');
// optional: $reverseDeploy->setPrivateKey(getenv('HOME') . '/.ssh/id_rsa');
// optional: $reverseDeploy->setSshPort(222);

/**
 * Get database
 */
$reverseDeploy->setSqlExcludeTable(['sys_log']);
$reverseDeploy->setSqlTarget("./tmp/");
$reverseDeploy->getDatabase();

/**
 * Get fileadmin
 */
// optional - download only used files: $reverseDeploy->setFileadminOnlyUsed(true);
// optional - to download files in ddev docker container: $reverseDeploy->setLocalTempPath('/var/www/web/');
$reverseDeploy->setFileTarget("./fileadmin/");
$reverseDeploy->getFiles($ssh);
  1. Run vendor/bin/typo3reverse

Add/remove methods for files include/exclude

Add/remove item to/from exludes array

$reverseDeploy->addExclude(["uploads"]);
$reverseDeploy->removeExclude(["uploads"]);

Add/remove item to/from includes array

$reverseDeploy->addInclude(["uploads"]);
$reverseDeploy->removeInclude(["uploads"]);

Use SSH-Key with passphrase

You can define your passphrase like shown in this example:

/**
 * Connect to Server
 */
$reverseDeploy->setPrivateKeyPassphrase('mypassword');
$reverseDeploy->setUser('USERNAME');
$reverseDeploy->setRemoteServer('example.org');

If you do not want to have your passphrase stored in a file, you can use an environment variable:

/**
 * Connect to Server
 */
$reverseDeploy->setPrivateKeyPassphrase(getenv('PASSPHRASE'));
$reverseDeploy->setUser('USERNAME');
$reverseDeploy->setRemoteServer('example.org');

Then you can start the reverse deployment with a command like this:

PASSPHRASE=mypassword vendor/bin/typo3reverse

Build phar file

Using MacFJA/PharBuilder package to create PHAR file

For configuration see composer.json extra -> phar-builder

php -d phar.readonly=0 vendor/bin/phar-builder package

统计信息

  • 总下载量: 3.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2018-03-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固