K
K
Ken Jee2016-09-03 16:08:46
Yii
Ken Jee, 2016-09-03 16:08:46

How to properly deploy Yii2 Advanced to production?

There is a home server on which Yii2 Advanced was deployed using Composer. During initialization (init) of Yii2, the Development mode was selected. Now the task is to upload to production. And here are a number of questions:
1) After deploying Yii2, some folders already have a .gitignore file... For example, such a file in the backend/web folder prohibits committing the index.php file... How to be?
2) Do I understand correctly that in production we should also deploy Yii2 through Composer, but in Production mode?
3) In Git, do I need to create separate repositories for Backend, Fronten, etc.?
I just want to know how to do it right

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
enchikiben, 2016-09-03
@Machez

1. if you need to edit index.php, then it must also be edited in the environments folder.
2. yes, that's right
3. no, Yii2 Advanced is one repository, it contains everything you need.
and if you want to do everything right, then here is https://habrahabr.ru/post/82724/ :)

N
Nikita, 2016-09-03
@bitver

The advanced template is ready to be laid out out of the box. In short:
git pull
./init
./yii migrate
composer install
Further in the development process, everything is the same only without init and put this thing on automatic with migrate --interactive 0
I may be missing something, but I hope the essence is clear

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question