This guide presents general guidelines for the development of projects on DotPlant2 team and calculations on the server battle.
As a rule, the development site to dotplant2 occurs without modifying core files.
The first thing you need to clone the repository dotplant2:
git clone https://github.com/DevGroup-ru/dotplant2.git
Now you need to make a basic installation DotPlant2 according to instructions.
All site specific functionality, including the design theme of your website, we recommend that you keep it in a separate folder
To create this folder, and base frame there is a special console command:
More information about the theme folder structure can be found in the section Using custom theme.
For convenient operation, you must create a repository for the theme:
cd application/web/theme git init git remote add origin [email protected]:vendor/repo.git # эта команда добавит remote origin к текущему репозиторию темы
Now your site specific functionality and design theme is under version control system.
Always replace your git.host:vendor/repo.git to the appropriate value for your repository!
The first roll out you must:
application/web/themeyour repository with the theme
application/configin local machine to production server, in this case:
serverNamevariable to production server domain
chmod -R 777 application/web/assets applicaiton/runtime)
cd application; php ../composer.phar install
Some people prefer not to install the composer, depending directly on the server and copy them to the local machine (by copying the contents of a folder
application/vendor). Such an embodiment example, but may result in conflicts.
Update DotPlant2 CMS core is performed in the following order.
From the folder where it was cloned dotplant2:
git pull # обновить git репозиторий cd application composer update # обновить зависимости composer ./yii migrate # применить миграции
application/web/theme folder need to be updated with your personal repository of site specific functionality and theme:
In some cases, it may be necessary to clear the cache and assets. To do this, in the backend there is a button in the upper right corner with eraser icon.
Alternatively, you can clean the cache console command:
cd application ./yii cache/flush cache
Keep in mind that changes to the database and downloaded files in your local machine do not fall into the version control system. At the same time, constantly copying the database server on the production server also not desirable - may be lost change orders and completed application forms, which have been produced directly on site.