rockielin / yii2-app-advanced-template
Yii PHP Framework Version 2 - Development Package
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Language:CSS
Type:yii2-extension
Requires
- php: >=7.0.0
- ext-bcmath: *
- ext-curl: *
- ext-json: *
- 2amigos/qrcode-library: 1.1.2
- 2amigos/yii2-ckeditor-widget: 2.1.1
- 2amigos/yii2-multi-select-widget: 1.0.0
- alexandernst/yii2-device-detect: 0.0.12
- bilginnet/yii2-cropper: dev-master
- borales/yii2-phone-input: 0.3.0
- bower-asset/infinite-scroll: 3.0.6
- codemix/yii2-localeurls: 1.8.0
- daixianceng/yii2-echarts: 1.2.0
- dompdf/dompdf: dev-master
- ecpay/sdk: 1.2.2210310
- firebase/php-jwt: 5.5.1
- geoip2/geoip2: 2.10.0
- guzzlehttp/guzzle: 6.5.2
- kartik-v/yii2-checkbox-x: 1.0.4
- kartik-v/yii2-date-range: 1.7.1
- kartik-v/yii2-export: 1.4.0
- kartik-v/yii2-field-range: 1.3.5
- kartik-v/yii2-grid: 3.3.5
- kartik-v/yii2-mpdf: 1.0.6
- kartik-v/yii2-tabs-x: 1.2.7
- kartik-v/yii2-widget-select2: @dev
- kartik-v/yii2-widgets: 3.4.1
- kriss/yii2-log-reader: 2.4
- linecorp/line-bot-sdk: ^7.6
- mrssoft/yii2-sitemap: ^2.0
- nirvana-msu/yii2-infinite-scroll: 1.0.*@dev
- php-webdriver/webdriver: ^1.15.0
- phpoffice/phpword: dev-master
- rmrevin/yii2-minify-view: 2.0.0
- spipu/html2pdf: dev-master
- steelywing/chinese: 0.5.3
- trntv/yii2-datetime-widget: 1.1.1
- unclead/yii2-multiple-input: 2.27.0
- vova07/yii2-console-runner-extension: 0.1.2
- vova07/yii2-imperavi-widget: 2.0.11
- wbraganca/yii2-dynamicform: *
- wdmg/yii2-tagsinput: 1.0.4
- yiisoft/yii2: 2.0.43
- yiisoft/yii2-authclient: 2.2.9
- yiisoft/yii2-bootstrap: 2.0.10
- yiisoft/yii2-httpclient: 2.0.13
- yiisoft/yii2-imagine: 2.3.0
- yiisoft/yii2-jui: 2.0.7
- yiisoft/yii2-redis: 2.0.15
- yiisoft/yii2-swiftmailer: 2.1.1
Requires (Dev)
- yiisoft/yii2-debug: 2.1.18
- yiisoft/yii2-gii: ~2.0.0
This package is auto-updated.
Last update: 2025-03-27 10:49:55 UTC
README
Advanced Project Template for demo, include frontend and backend(with RBAC authorization), just practice dont use in production.
Docker安裝
https://docs.docker.com/compose/install/
安裝
若尚未安裝composer, 先執行composer安裝
curl -sS https://getcomposer.org/installer | php
透過composer直接建立新專案:
php composer.phar create-project --prefer-dist --stability=dev rockielin/yii2-app-advanced-template project-name
或
clone此專案
php composer.phar install --no-interaction
composer run-script post-install-cmd
更新
php composer.phar update --no-interaction
拷貝設定檔 設定domain, db相關資訊 (因部署環境會變動的設定)
cp common/congif/main.example.php common/congif/main.php
本機開發啟動(port自訂)
後台 http://localhost:8080 測試帳密(example@example.com / 123456)
php yii-admin serve --port=8080
前台 http://localhost:8081 測試帳密(example@example.com / 123456)
php yii-front serve --port=8081
php yii-api serve --port=8082
common(圖片共用程式) http://localhost:8083
php yii-common serve --port=8083
本機開發工具
Debug Tool (不同站台debug路徑不同)
http://localhost:808x/debug
產生器
http://localhost:808x/gii
清cache(範例用FileCache, 不同站台cache路徑不同)
http://localhost:808x/job/clearcache
Docker執行:
部署環境若使用Docker, 須先設定nginx/conf.d
進入 ./docker後執行
docker-compose up -d
Docker其他命令:
docker setting
docker-compose.yml
building
docker-compose build
start continer
docker-compose up -d
stop
docker-compose down -v
show log
docker-compose logs -f
access continer
docker-compose exec php bash
Docker中Supervisor命令:
啟動
supervisord -c /etc/supervisor/supervisord.conf
查看supervisor是否啟動
ps aux | grep supervisor
關閉supervisor主進程
supervisorctl shutdown
pkill -f supervisord # kill it
查看supervisor執行的子進程
supervisorctl status
其他:
後台Theme有些混亂 待處理