tobinski/bedrock-docker-deployer
Composer 安装命令:
composer require tobinski/bedrock-docker-deployer
包简介
Deployer recipes for Roots Bedrock with containerized DB
README 文档
README
Deployer recipes for containerized Roots Bedrock databases, also supports Roots Sage..
Docker is a very powerful environment and helps you to deploy images to your server. If you develop on docker but need to deploy to a classic server, you need to dump the DB from the container and send it to the server.
This recipe helps you to use florianmoser/bedrock-deployer with a containerized setup.
Maybe you are even trying to deploy Bedrock to a shared hosting. Depending on your hosting environment, this may be possible. Check out florianmoser/plesk-deployer.
A word of caution: Make sure you have a backup of your local as well as your remote files, before experimenting with deployment recipes. Files might easily get overwritten when you provide wrong paths! You are solely responsible by using the recipes provided here.
Who needs this
PHP developers who would like to deploy their containerized Bedrock applications to a non-containerized server using Deployer.
Installation
Use Composer:
$ composer require tobinski/bedrock-docker-deployer
Recipes
This package offers one recipes to help you deploy your database to a server. You need additional recipe from florianmoser/bedrock-deployer
Bedrock DB
Provides tasks to export the database from the server and import it to your development container and vice versa.
Requirements:
- docker running on your local machine
- WP CLI running on your container as well as on your remote machine
Load into your deploy.php file with:
require 'vendor/tobinski/bedrock-docker-deployer/recipe/bedrock_dopcker_db.php';
Requires these Deployer environment variables to be set:
- local_root: Absolute path to website root directory on local host machine
- wp_container: The name of the Wordpress container Example:
set( 'local_root', dirname( __FILE__ ) ); set( 'wp_container', "wordpress );
Task pull:db
Exports database on server and imports it into your local container, while removing previous data. Creates a backup of the local database in the local_root directory, before importing the new data.
After the import, the WordPress URLs are converted from server URL to local URL, so your WordPress installation will continue to work right after the import.
Database credentials and URLs are read from remote and local .env file. So make sure, those files are up to date.
Task push:db
Exports database from local container and imports it into your remote server, while removing previous data. Creates a backup of the remote database on the server in the current release directory, before importing the new data.
After the import, the WordPress URLs are converted from local URL to remote URL, so your WordPress installation will continue to work right after the import.
Database credentials and URLs are read from remote and local .env file. So make sure, those files are up to date.
tobinski/bedrock-docker-deployer 适用场景与选型建议
tobinski/bedrock-docker-deployer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.17k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 03 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 tobinski/bedrock-docker-deployer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tobinski/bedrock-docker-deployer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-05