B
B
bulochkinvalya2021-03-18 11:25:31
1C-Bitrix
bulochkinvalya, 2021-03-18 11:25:31

The right approach to development on Bitrix?

STAGE 0. Prelude.

Position - site administrator. Responsibilities - translate the wishes and comments of the management into an understandable language and transfer the work to the performers. Site on 1s Bitrix.

After some time, the performers began to fuck up, and took over part of the work. At first it was just posting articles and correcting grammatical errors, then fixing the basic logic of the application (displaying not 2 pictures in a row, but 3), and so on, it got interesting.

Before that, I had never worked in an IT organization, with Bitrix either, so I have to fence all the bikes on my own. The question arose of how to properly organize the logic of work on the site.

STAGE 1 START

We connect via FTP, edit the files and look at the result. We are trying to repeat the steps that we did in the initial HTML, CSS, PHP tutorials. The first site crashes. We thought that we should not do this at the combat

STAGE 2 KINDERGARTEN We made a

subdomain, now all changes do not drop the combat site. We got a little bolder. Let's think about the guitar.

STAGE 3 SCHOOL

All freelancers. We moved to our own VDS, mastered vscode, Git, SSH.

Now, through vscode + remote ssh plugin, we connect to the server, change the subdomain, if everything is ok, push to git, and update the combat one through git checkout.

The essence of the problem.
It is not possible to raise Bitrix on a local machine. We tried openserver, self-tuning windows, in short, everything works like that. Perfectly configured only on Linux. And that is thanks only to the automatic configuration of the Bitrix environment. Yes, and editing on the local one in order to load it on a obviously different combat one seems not a very right decision.

In the .gitignore folder it is written to ignore the /bitrix/** folder, but with the git status command, hundreds of Bitrix caching lines crash.
60530bcd74954435787576.png
I read that you can set up .vscode/settings.json, but almost everywhere it says that this is somehow related to git, respectively, vscode issues
60530c6da3731022216462.png

How to exclude vscode and git tracking in unnecessary folders?
Why does git continue to monitor with the configured parameters?
Maybe you need to write to the .git/info/exclude folder?
Perhaps I have the wrong logic of work, and normal people do it in a completely different way, can you tell me how you do it?

I draw your attention, I work in vscode via ssh connection, perhaps this is important and imposes restrictions.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2021-03-18
@udjin123

Vscode is better to replace with PhpStorm.
Everything works fine on LAN, including on openserver, but the environment needs to be created as close to combat as possible. According to this, under Windows, the best docker option in wsl2. For docker, see bitrixdoc for a ready-made solution.

S
Sergey, 2021-03-24
@Firsov36

Asked for advice, here:
Switch to Phpstorm. Folder bitrix / why ignore? But what about IDE hints for writing code? At least bitrix/modules/, bitrix/component/, bitrix/js/ - I leave. Also, the Bitrix code gives many answers without a documented API. Or use bitrix cli and generate an orm:annotation file for hints.

via git checkout we update the combat

typo, are you kidding me or are you serious? uploading changes to the site is git pull, while checkout is to switch to another branch and switching to another branch does not download new data. Yes, and branches sometimes need to be closed.
We tried openserver, self-tuning windows, in short, everything works like that.

Here download the image for VMWare Player or VirtualBox (both free), install BitrixEnv on top of CentOs minimal there and create at least a dozen sites based on this virtual server. There you can torment them as you like, and server snapshots allow you to return everything in a matter of minutes, if not even the site, but the server has collapsed.
You develop on a virtual server in a new branch of the repository (for example, issue-1). You test on your virtual server, then complete the development, merge the issue-1 branch in production (or master) into production and upload it to the production server (or pre-combat). all OK? the issue-1 branch can be deleted.
ps The beginning of your question pleased)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question