Answer the question
In order to leave comments, you need to log in
Is it possible to set up CI/CD without docker?
Hey!
I've never dealt with setting up CI/CD before, I thought it could make life a lot easier on my pet projects.
I worked only in one company with competent CI / CD, everything was implemented through docker. Is it possible to do without it? I have a windows home version, and I can’t use docker (the advice to install Linux is very cool, infa weave). And I still don’t really understand the need for a docker, no matter how many laudatory reviews I hear - for small projects, for sure (but I saw how highly loaded services work without it).
For now, I imagine the CI / CD chain to myself as follows: I push to the master, the front is automatically built on the server, thrown into the server static folder, pm2 reboots. Is this normal?)
I apologize for the stupid question! Specifically, DevOps is still very noob. If you can’t do without docker, or this is a very stupid idea, then how can you make a container only on the server?
I honestly spent several hours of time searching for some adequate article or video on this topic, but so far everything is very superficial. I would be grateful for help and discussion)
Answer the question
In order to leave comments, you need to log in
Everything is done quite simply and without a docker. With the help of rsync, tar, openssh and sshpass , it is quite possible to set up an almost "seamless" deployment.
The logic will be as follows (using gitlab):
1. Build your project completely
2. Pack it into a tar archive, say deploy_new
3. Using ssh and rsync, upload the archive to your server next to the main folder of the working project (for example, public_html)
4. Connect also via ssh and:
- unpack the archive to the deploy_new folder
- rename public_html, say, to deploy_old
- rename the deploy_new folder to public_html
- if everything is OK, delete the deploy_old folder and the downloaded archive
5. Done)
Of course you can!
How easier to implement? - depends on where you have the repo and whether the server is "real".
If the repo is GitHub, read about GitHub Action - https://help.github.com/en/actions/automating-your...
It is possible, in some cases it is even preferable.
Docker just gives you a guaranteed clean environment without unnecessary "garbage".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question