kgaut/drupal-makefile
Composer 安装命令:
composer require kgaut/drupal-makefile
包简介
Generic makefile rules to manage a drupal 8+ project
关键字:
README 文档
README
Generic makefile rules to manage a drupal 8+ project
Installation
composer require kgaut/drupal-makefile
Edit your .env file and copy / paste the following vars, do not forget to change values according to your setup :
### --- PROD_ENV ----
# SSH User
PROD_USER=my_user
# SSH Host or IP
PROD_HOST=my_host
# SSH path to website (composer folder, not docroot) (ie : ~/website)
PROD_PATH=/path/to/website
# path to drush (ie : ~/website/vendor/bin/drush)
PROD_DRUSH=path/to/drush
# Prod url
PROD_URL=my-website.net
# Database folder containing dumps relative to PROD_PATH (ie: db)
PROD_DB_PATH=db
### --- PREPROD_ENV ----
# SSH User
PREPROD_USER=my_user_preprod
# SSH Host or IP
PREPROD_HOST=my_host_preprod
# SSH path to website (composer folder, not docroot) (ie : ~/website)
PREPROD_PATH=/path/to/website
# path to drush (ie : ~/website/vendor/bin/drush)
PREPROD_DRUSH=~/website/vendor/bin/drush
# preprod url
PREPROD_URL=preprod.my-website.net
# Database folder containing dumps relative to PREPROD_PATH (ie: db)
PREPROD_DB_PATH=db
### --- LOCAL_ENV ----
# Local path to drupal temporary files
LOCAL_TMP_PATH=./files/tmp
# Local path where to store database dumps
LOCAL_DB_PATH=db
Edit Makefile and add just after the line include .env (or after the line include docker.mk, depending on your docker4drupal version) :
include vendor/kgaut/drupal-makefile/drupal.mk
Mount your local dump folder to /var/db within your mariadb container.
Sample of mariadb service definition :
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
volumes:
- ./$LOCAL_DB_PATH:/var/db
Availables rules
db-dump
make db-dump
Create a local database gziped dump.
db-preprod-dump
make db-preprod-dump
Create a preproduction database gziped dump.
db-prod-dump
make db-prod-dump
Create a production database gziped dump.
db-prod-import
make db-prod-import
Empty local database, import the most recent database dump from production, rebuild caches, run database updates, import configuration and provide an authentification url as user 1.
db-preprod-import
make db-preprod-import
Empty local database, import the most recent database dump from preproduction, rebuild caches, run database updates, import configuration and provide an authentification url as user 1.
db-prod-get
make db-prod-get
Download the most recent database dump from production.
db-preprod-get
make db-preprod-get
Download the most recent database dump from preproduction.
db-import
make db-preprod-get
Empty local database, import the most recent dump available localy, rebuild caches, run database updates, import configuration and provide an authentification url as user 1.
db-post-import
make db-preprod-get
Rebuild caches, run database updates, import configuration and provide an authentification url as user 1.
db-empty
make db-empty
Empty local database.
dd-tail
make dd-tail
Tail the drupal-debug.txt files.
watchdog
make watchdog
Tail the watchdog entries.
Note : for this command to works, you'll need to patch drush/drush by adding the following lines to the patches section of your composer file :
"drush/drush" : {
"Adding --tail option to drush ws." : "https://github.com/kgaut/drush/commit/8b79fb395d344ae6f07300e87408db49d158b80b.diff"
},
For more informations : https://kgaut.net/blog/2016/drupal-8-composer-appliquer-un-patch-dans-le-fichier-composerjson.html
ssh-prod
make ssh-prod
Open a ssh connexion to production server.
ssh-preprod
make ssh-preprod
Open a ssh connexion to preproduction server.
sapi
make sapi
Rebuild Search API indexes
kgaut/drupal-makefile 适用场景与选型建议
kgaut/drupal-makefile 是一款 基于 Makefile 开发的 Composer 扩展包,目前已累计 12.02k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 06 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「drupal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kgaut/drupal-makefile 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kgaut/drupal-makefile 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kgaut/drupal-makefile 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provides an add-on purchasable entity.
Drupal integration module for the Kalastatic prototyping and styleguide tool
Provides a base set of configuration and module dependencies for starting new Drupal projects.
This module extends Drupal Migrate framework.
Installs and configures the WissKI base environment with mandatory modules.
Tiny set of PHP text utility classes.
统计信息
- 总下载量: 12.02k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2020-06-16