kriss / yii2-advanced
Yii2 高级项目模板,API 前端和带有 AdminLTE 的后端
v1.2
2018-12-04 06:55 UTC
Requires
- php: >=7.0
- dmstr/yii2-adminlte-asset: ^2.6
- kartik-v/yii2-datecontrol: ^1.9
- kartik-v/yii2-dynagrid: ^1.4
- kriss/env-generator: ^1.0
- kriss/yii2-adminlte-iframe-mode: ^2.0
- kriss/yii2-common-class: ^2.0
- kriss/yii2-flysystem: ^1.1
- kriss/yii2-log-reader: ^2.2
- vlucas/phpdotenv: ^2.4
- yiisoft/yii2: 2.0.15.1
- yiisoft/yii2-bootstrap: ^2.0
- yiisoft/yii2-redis: ^2.0
Requires (Dev)
- yiisoft/yii2-debug: ^2.0
- yiisoft/yii2-gii: ^2.0
Suggests
- friendsofphp/php-cs-fixer: For Fix: composer global require friendsofphp/php-cs-fixer
This package is auto-updated.
Last update: 2024-09-10 13:40:31 UTC
README
新建项目
git clone https://github.com/krissss/yii2advanced xxx
# or
composer create-project kriss/yii2-advanced xxx
开发
# 安装依赖 composer install yarn # 初始化环境(dev) php init # 数据库迁移 php yii migrate # 数据初始化 php yii init/init-data # 权限初始化 php yii init-auth/restore # 启动 php composer serve # 启动 vue yarn serve
正式部署
# 安装依赖 composer install --no-dev yarn # 初始化环境(prod) php init # 数据库迁移 php yii migrate # 数据初始化 php yii init/init-data # 权限初始化 php yii init-auth/restore # 配置 nginx 访问 php # 编译前端 yarn build
使用 docker-compose
php init --env=dev --overwrite=all # modify .env and docker-compose.yml docker-compose up docker-compose exec app composer install -vvv docker-compose exec app php yii migrate docker-compose exec app php yii init/init-data docker-compose exec app php yii init-auth/restore docker-compose exec app bash