bellcom/os2subsites_provision
Composer 安装命令:
composer require bellcom/os2subsites_provision
包简介
Server scripts solution to manage Drupal multisite.
README 文档
README
Requirements.
- Drupal 7,8
- Apache web server
NOTE: This solution doesn't work with NGINX web server.
Download and install.
Composer is recommended way to get files in your drupal project.
Just use command composer require bellcom/os2subsites_provision.
Composer specific settings.
For composer based stack you will need to add specific settings to composer.json file.
1. Override default installed path for composer installer.
By default bellcom/os2subsites_provision will be installed as drupal-module.
Add extra line to your composer.json to override default path.
Add this line
"scripts/os2subsites_provision": ["bellcom/os2subsites_provision"],
above line define path for drupal modules
"extra": {
...
"installer-paths": {
...
"scripts/os2subsites_provision": ["bellcom/os2subsites_provision"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
...
}
...
}
2. Check local and config files.
Composer will keep os2subsite_provision code base updated and stable. It means that all
extra files will be removed from os2subsites_provision directory, includes config
and local files. To add files back after every composer install/update add
following command to composer.json scripts section.
"scripts": {
...
"post-install-cmd": [
...
"./scripts/os2subsites_provision/check_config.sh scripts/os2subsites_provision_config"
...
],
"post-update-cmd": [
...
"./scripts/os2subsites_provision/check_config.sh scripts/os2subsites_provision_config"
...
]
},
To manage subsites there are drupal module that triggering server scripts. See how to add module below.
Allow web server run os2subsites_provision scripts.
To allow web server run scripts that will handle subsites you need to allow
apache user run this scripts with sudo rights without password.
To allow Apache user www-data run os2subsites scripts add following line
to /etc/sudoers.d/os2subiste_provision file.
www-data ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_add_domain.sh
www-data ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_create.sh
www-data ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_delete.sh
www-data ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/subsite_remove_domain.sh
www-data ALL=(root) NOPASSWD: /var/www/[your-project]/scripts/os2subsites_provision/reload.sh
Restart web server after adding to apply changes.
Check article How to run sudo command without a password if you need more info or just google it.
Drupal 8 module.
To add module to your Drupal 8 installation create symlink to proper 8.x module
as you can see in example. It assumes that you have web as drupal root
folder and scripts/os2subsites_provision as folder with os2subsites scripts.
mkdir -p ./web/modules/custom
cd ./web/modules/custom
ln -s ../../../scripts/os2subsites_provision/8.x/bc_subsites
See module README.md file
Drupal 7 module.
To add module to your Drupal 7 installation create symlink to proper 7.x module
as you can see in example. It assumes that you have docroot as drupal root
folder and scripts/os2subsites_provision as folder with os2subsite_provision scripts.
mkdir -p ./web/sites/all/modules/custom
cd ./web/sites/all/modules/custom
ln -s ../../../../../scripts/os2subsites_provision/7.x/bc_subsites
See module README.md file
bellcom/os2subsites_provision 适用场景与选型建议
bellcom/os2subsites_provision 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 404 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 02 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bellcom/os2subsites_provision 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bellcom/os2subsites_provision 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 404
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-06