X
X
Xeldos2021-11-03 22:02:24
GitLab
Xeldos, 2021-11-03 22:02:24

How to organize (not customize!) CD in web development?

Again a stupid question, but I did not find the answer. There is a web project that several people are working on. Periodically, during the development process, you need to look at "what happened", perform manual testing, and so on. I broke my head trying to figure out how to organize it beautifully in a modern way. I tried to google, either I don’t know how to formulate, or one of the two.
Here's what I came up with at the moment. There is a gitlab. There is a dev server on which runner is spinning. When committing (more precisely, when pushing), everything is collected by the docker and the container is launched on the server. But there are several developers! How to run? On different ports? You 8081, you 8082? And there is also a DBMS, to which access is also needed - to climb in with your hands and look and fix it. You 5432, you 5433 and so on? Ugly. You can get confused. There is no isolation :( And not only the DBMS, there may be other services. So there won’t be enough ports for everyone. Then, there are situations when the developer postpones the branch task and starts working on another task in another branch. What then? Break everything that was on 8081 and 5432, and roll over?The solution is also somehow not very visible.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vasily Bannikov, 2021-11-03
@vabka

But there are several developers! How to run? On different ports?

We organized this with the help of test stands - the developer simply chooses in advance which stand he will occupy, and his code is loaded onto it.
Will get a.test.example.com, b.test.example.com and so on.
You can also give more memorable names, such as alpha / beta / gamma, etc.
And there is also a DBMS, which also needs access

In the subd, you can create separate databases, and actually connect to them - you start your own database for each developer and that's it.
In general, HTTP can be resolved at the level of domain names, services in the docker - you can somehow create separate internal grids, and data - in a separate database, either statically for one developer, or dynamically for each branch.

S
Stanislav Bodrov, 2021-11-04
@jenki

There is a web project that several people are working on.
In the vast majority of cases, this is a common situation.
Periodically, during the development process, you need to look at "what happened", perform manual testing, and so on. I broke my head trying to figure out how to organize it beautifully in a modern way.
Decide on the appropriate git flow for the project and team.
When committing (more precisely, when pushing), everything is collected by the docker and the container is launched on the server. But there are several developers! How to run? On different ports? You 8081, you 8082? And there is also a DBMS, to which access is also needed - to climb in with your hands and look and fix it. You 5432, you 5433 and so on?
All sorts of mocks can be used and not climb the base. If religious restrictions interfere with this, then on the database server, these databases can be created a lot. At least one for each request to the developer base. Only with credits the main thing is not to get tired.
Then, there are situations when a developer postpones a branch task and starts working on another task in another branch. What then?
If there is no desire to clean up the project, create a separate deployment for each branch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question