yii2 service & mvc template.
- Nginx 1.8+
- PHP 5.4+
- Mysql 5.6+
- Redis 3.0+
-- api (example program)
-- commands
-- controllers (define your command)
-- common
-- assets (common assets)
-- base (base class)
-- components (common components)
-- datas (common datas)
-- helpers (common helpers class)
-- migrations (common migrations script)
-- models (common models)
-- services (common services logic)
-- traits (common traits)
-- views (common h5 views and some template)
-- widgets (common widgets)
-- workers (common queue workers)
-- config (global config)
-- route (route rule)
-- tests (unit test case)
-- runtime (live with cache and logger)
# download repertory
git clone https://github.com/chenyuanqi/yii2-smvc.git
cd yii2-smvc
# install dependent
composer install
# setting
cp .env.example .env
vim .env
- migrate example
./yii migrate/create create_tests_table -p=common/migrations
./yii migrate/up -p=common/migrations/
- supervisorctl manage queue
sudo supervisorctl -c /etc/supervisord.conf status
sudo supervisorctl -c /etc/supervisord.conf stop cube-queue
sudo supervisorctl -c /etc/supervisord.conf start cube-queue
./yii queue cube_queue 1 15000