C
C
Comport2018-12-16 22:37:31
phpstorm
Comport, 2018-12-16 22:37:31

How to properly create a project (two virtual servers and two spins) in PHPStorm?

Good evening!
Gentlemen, I’m taking my first steps in phpStorm after Sublime and I’m already incredibly satisfied, but still I still don’t fully understand everything, please tell me how to create a new project correctly under these conditions:
1) the project itself is essentially a Bitrix site with multi-sites on different domains (this is generally not important, but for better understanding, the clarification may be suitable), that is, there are two spins on the server, in one core, in the other logic, each spin has its own domain, that is, the project can be accessed by different domains, this like two different sites, but from the point of view of the code - it is common, that is, there may be a task that affects both sites, in fact, we can say that both dorotas are folders of the same project.
2) what is the difficulty - I suspect that the time is incorrect when I create a new project with the type - remote ssh server, in the connection settings I specify the root of the server, in which there are two folders of my sites, and then I configure the mapping for deployment to two folders. .. So it will work, that is, I simply exclude all other folders in the server’s dokrut from deployment, but in the connection settings, a single server URL is indicated, that is, if I open a file of one site and click on the browser in the pop-up panel, I will get to the url that is specified in the sevrev settings... Here you immediately feel a rift and a contradiction to the logic of the IDE, which I would not want to allow ..
3) what is the problem to make two projects for both sites? Well, they have a common repository, work with them is carried out inseparably with both, and purely logically, I don’t want to separate them.
4) if the above is crutches and otherwise it’s impossible to do a separate server for each project, then please explain the feature of attaching a project one to another - I tried it like this: if you set up a separate server for each project - everything is super, everything works as it should, but if you open two projects with the Attach option selected when opening, the deployment on one project stops working...
In general, I will be grateful for any help! Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OnYourLips, 2018-12-16
@OnYourLips

You have a repository, you mentioned it in the question.
Half of the work is done, it is necessary to properly deploy.
What is in the storm is a deployment for dev servers, this is not a production solution, it is only for development.
Take capistrano, rocketeer, deployer or even ansistarno and setup both servers. With different additional build steps for each, in order to pour out only what is needed.
You can do it as you like - here you will already describe how the steps are.

C
Comport, 2018-12-17
@Comport

I figured out the question that I asked (maybe I didn’t set it quite correctly): as a project, I opened a folder a level higher, in which my two dokruts are located, set up one deployment server and set the pamming of local folders with folders on the server - everything works great as I need , thank you all!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question