2017 © Pedro Peláez
 

project yii2-advanced

Yii2 advanced project template, Frontend for API and Backend with AdminLTE

image

kriss/yii2-advanced

Yii2 advanced project template, Frontend for API and Backend with AdminLTE

  • Monday, July 30, 2018
  • by kriss
  • Repository
  • 1 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Yii2 advanced template

新建项目, (*1)

git clone https://github.com/krissss/yii2advanced xxx
# or
composer create-project kriss/yii2-advanced xxx

开发, (*2)

# 安装依赖
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

正式部署, (*3)

# 安装依赖
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

use 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

The Versions