Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/yii2-appPublic template

All you need for Rapid Development is My Advanced Template (Docker, DB||Redis Cache, Gentelella Admin, Dektrium-User, log-db, queue-db, i18n, EmailForm, postcss, Gii Ant) ~~~FREE WITH GREAT SUPPORT!~~~

License

NotificationsYou must be signed in to change notification settings

akiraz2/yii2-app

Repository files navigation

Yii2-app is Fast and Ready-to-production advanced project template.

Dockerized, for development (mysql, nginx, php-fpm)

Please,enable php intl extension for better work.

Default, the template includes three tiers:frontend,backend, andconsole, each of which is a separate Yii application.

NOTE: Template is in initial development. Anything may change at any time.

Features

  • Gentelella Admin template is beautiful and simple bootstrap, compatible with yii2 assets:yiister/yii2-gentelella,Demo
  • Yii2 User is strong and proved user-module with many features:dektrium/yii2-user (loginadminus, passwordadminus)
  • Frontend and Backend User Controllers are filtered (bydektrium/yii2-user)
  • File or DB cache, but I recommend Redis Cache - it is really fast
  • Yii2 queue (DB tablequeue), but you can useRedis-queue or otheryii2-queue docs
  • Queue Manager with backend (/queuemanager/default/index) usingignatenkovnikita/yii2-queuemanager
  • Log DB Target with backend (/log/index) - simply view log messages
  • .htaccess - config forpretty urls (rewrite index.php),may be later add nginx config
  • UrlManagerFrontend for backend app (all url rules in filefrontend/config/urls.php, hostInfo incommon/config/params.php)
  • i18n translations incommon/messages with config (current only English and Russian, language translation are welcome!)
  • ContactForm in frontend app is improved:himiklab/yii2-recaptcha-widget,all email are saved to DB (common/models/EmailForm Model), optionally send message to Viber messenger via bot(install requirementsBogdaan/viber-bot-php and config, uncomment code in Model)
  • Gii generator:
  1. addedyii2-queue Jobs generator
  2. yii2 migration generator (from existing table)Insolita/yii2-migrik
  3. schmunk42/yii2-giiant - really steroid, but in development with bugs

Available modules

These modules can be easy installed to Yii2-App using Composer:

Installation

Yii2-app template can be installed using composer. Run following command to download and install Yii2-app:

composer create-project --prefer-dist akiraz2/yii2-app my-site

After installation runinit

Docker

Install yii2-app usingDocker:

  1. run command to create project
docker run --rm --interactive --tty \  --volume $PWD:/app \  --volume ${COMPOSER_HOME:-$HOME/.composer}:/tmp \  composer create-project --prefer-dist akiraz2/yii2-app my-site
  1. copy.env-dist to.env, configure if needed. You can change DB from mysql to postgresql - just change docker-compose.yml (and common/config/main-local.php after init)
  2. copy/mysql/docker-entrypoint-initdb.d/createdb.sql.example tocreatedb.sql if you have ready DB (so dont run migrations)
  3. docker-compose build (you can configure Docker PHP in /php/Dockerfile-debian before building, for example, add mongodb)
  4. docker-compose up -d
  5. docker-compose exec php bash, in terminal runcomposer install, thenphp init, then run other migrations (see next)
  6. openhttp://localhost:8100 to test frontend (backend is on http://localhost:8200)

Access to Console App:docker-compose exec php bash andphp yii mycommand/action

Migrations

NOTE: Make sure that you have properly configureddb application component and run the following command

php yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrationsphp yii migrate --migrationPath=@yii/log/migrations/php yii migrate --migrationPath=vendor/ignatenkovnikita/yii2-queuemanager/migrations/php yii migrate/up

Default User Credentials

login:adminuspassword:adminus

Web server config

For newbies, I will recommend reading these instructionsyiisoft/yii2-app-advanced/start-installation.md (apache, nginx, etc\hosts

Development

Messages

Change incommon/config/main.php

'language' => 'ru-RU','sourceLanguage' => 'en-US',

Add your language incommon/messages/config.php

    'languages' => [        'ru-RU',    ],

In shell

php yii message/extract common/messages/config.php

Support

If you have any questions or problems with Yii2-App you can ask them directlyby using following email address:akiraz@bk.ru.

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.+PSR-2 style coding.

I can apply patch, PR in 2-3 days! If not, please write meakiraz@bk.ru

Licensing

Yii2-App is released under the BSD License. See the bundledLICENSE.mdfor details.

About

All you need for Rapid Development is My Advanced Template (Docker, DB||Redis Cache, Gentelella Admin, Dektrium-User, log-db, queue-db, i18n, EmailForm, postcss, Gii Ant) ~~~FREE WITH GREAT SUPPORT!~~~

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp