bigfork / silverstripe-recipe
Bigfork的SilverStripe CMS菜谱
1.0.0
2019-07-11 08:34 UTC
Requires
- bigfork/google-analytics: ^1
- bigfork/htmleditorsrcset: ^2
- feejin/silverstripe-securitytemplates: ^3
- heyday/silverstripe-responsive-images: ^2
- kinglozzer/metatitle: ^2
- sentry/sentry: ^1
- silverstripe/assets: ^1
- silverstripe/cms: ^4
- silverstripe/config: ^1
- silverstripe/errorpage: ^1
- silverstripe/framework: ^4
- silverstripe/recipe-plugin: ^1
- symbiote/silverstripe-gridfieldextensions: ^3
- wilr/silverstripe-googlesitemaps: ^2
Requires (Dev)
- phpunit/phpunit: ^5
This package is auto-updated.
Last update: 2024-09-21 06:09:16 UTC
README
Bigfork为简单的SilverStripe 5项目提供的快速入门菜谱。包含常用模块、模板、配置设置、JavaScript和CSS。
项目设置
- 运行
composer create-project bigfork/silverstripe-recipe ./project dev-master
- 回答“Do you want to remove the existing VCS (.git, .svn..) history?”为“是”
- 运行
ddev start
- 绘制剩余的猫头鹰
部署
我们使用Deployer进行部署,可以全局安装(推荐)
curl -LO https://deployer.org/deployer.phar mv deployer.phar /usr/local/bin/dep chmod +x /usr/local/bin/dep
或使用Composer按项目安装
composer --dev require deployer/deployer
配置
编辑deploy/config.php
并设置应用程序名称和git仓库URL。其他内容为可选。
部署网站
只需运行dep deploy
即可。
第一次部署时,你可能希望包括数据库和资产
dep deploy
dep silverstripe:upload_assets
dep silverstripe:upload_database
(第一次部署到指定阶段时),你将被要求提供用于填充.env
的数据库凭据。
部署到生产环境
与部署到测试环境大致相同,只需提供一个额外的参数以选择阶段(可以是staging
或production
)
dep deploy production
部署分支/标签
# Deploy the dev branch to staging
dep deploy --branch=dev
# Deploy tag 1.0.1 to production
dep deploy production --tag=1.0.1
手动上传/下载数据库和资产
# Upload assets
dep silverstripe:upload_assets
# Upload database
dep silverstripe:upload_database
# Download assets
dep silverstripe:download_assets
# Download database
dep silverstripe:download_database
# Upload assets to production
dep silverstripe:upload_assets production
# Upload database to production
dep silverstripe:upload_database production
# Download assets from production
dep silverstripe:download_assets production
# Download database from production
dep silverstripe:download_database production
手动执行dev/build
# dev/build on staging
dep silverstripe:dev_build
# dev/build on production
dep silverstripe:dev_build production