3p5/bootstrap
Composer 安装命令:
composer require 3p5/bootstrap
包简介
Bootstrap for WordPress project using Composer
关键字:
README 文档
README
Bootstrap for WordPress project using Composer.
Requirements
koodimonni/composer-dropin-installer- container (
podman,docker)
Installation
Before reinventing the wheel, just check out our skeleton section for inspiration. Otherwise, follow reading :-)
Composer
Before installing the package you need to define the dropin paths in your composer.json. If you installed the package
too early, just delete it from vendor folder. This will re-trigger the dropin-process.
The configuration in your composer.json should look something like this:
{
"extra": {
"config": {
"allow-plugins": {
"koodimonni/composer-dropin-installer": true
}
},
"dropin-paths": {
"public/": [
"package:3p5/bootstrap:public/index.php,public/bootstrap.php,public/wp-config.php,public/wp-config-sample.php"
]
}
}
}
Now you can install the package from composer repository. For plugin/theme development, add --dev as argument.
composer require 3p5/bootstrap
Container
To auto-generate wp-config.php you need to add following to your entrypoint.sh:
if [ "$WP_ENV" != 'production' ]; then
su -s /bin/sh - www-data -c '
cd /srv/app;
composer install --prefer-dist --no-progress --no-interaction;
yarn install
'
fi
if [ ! -f "public/content/wp-config.php" ]; then
echo "Creating wp-config.php & generating salts"
su -s /bin/sh - www-data -c '
cd /srv/app;
cp -a public/wp-config-sample.php public/content/wp-config.php;
wp config shuffle-salts --config-file=public/wp-config.php
'
fi
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX public/content
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX public/content
BTW: For critical infrastructure it's not a bad idea to re-generate salts after each deployment. But to be honest, for
that it's a worse idea relying on WordPress :-)
Configuration
Environments
It's possible using system environments and/or container secrets. For secrets, just suffix the environment variable with
_FILE and the path to the file, e.g.:
DB_PASSWORD_FILE=/run/secrets/db_password
A full list of all environment variables is not available yet, please check src/Service/Configuration.php.
Trusted proxies
If you're using this application behind a reverse proxy (e.g. traefik), you need to set the trusted proxies to the
CIDR of your proxy network. Otherwise you'll not get correct request scheme or client's real ip.
To set the trusted proxy, do something like this:
TRUSTED_PROXIES="172.0.0.0/24, 10.0.0.0/8, ..."
For testing, you can also set a wildcard (*).
Development
We're using some kind of git flow, so for merge requests please create a new branch from develop.
For consistency and security reasons, please run everything inside the container. Most tools are already pre-built in the dev-container.
podman compose up -dpodman exec -it -u www-data bootstrap_app_1 sh
WP-CLI
You can also use WP-CLI, switch to container and check following
./vendor/bin/wp --path=cms/ --url=https://localhost help
Permissions
If you're using podman in rootless mode (recommend), you'll for sure get permission issues while starting the container
and also maybe while git interaction on host system. To fix permissions, you need to change the owner to your shadowed
group id. Run following command with your specific gid (you can simply check inside your container):
sudo chown -R :${GID:-100081} .
To revert back, run following:
sudo chown -R ${USER}:${USER} .
PS: You should also be able to use podman unshare. Also, some IDEs support some automatic permission fixing while
development. If you've found a better solution, feel free to improve this documentation :-)
3p5/bootstrap 适用场景与选型建议
3p5/bootstrap 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 480 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 05 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「bootstrap」 「wordpress」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 3p5/bootstrap 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 3p5/bootstrap 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 3p5/bootstrap 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
Selectize Theme for Bootstrap 4
Cross browser time implementation using CSS and JQuery. Compatible with Twitter Bootstrap
The Attogram Framework provides developers a PHP skeleton starter site with a content module system, file-based URL routing, IP-protected backend, Markdown parser, jQuery and Bootstrap. Core modules available to add an integrated SQLite database with web admin, user system, and more.
The Arquivei Laravel Skeleton API.
统计信息
- 总下载量: 480
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-only
- 更新时间: 2025-05-19