W
W
WebDev2019-03-17 01:18:15
Software Deployment
WebDev, 2019-03-17 01:18:15

How do you update vue projects in production?

I am using vue-cli. By default, dist is added to .gitignore, which means that I commit the changes, pull them in on the server, and run npm run build on the server. The problem is that after running npm run build deletes the dist directory and generates a new one. All this time the site is unavailable. To solve this problem, I removed dist from .gitignore and upload the already built project, but this is ideologically wrong. How are you doing?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Konstantin Kitmanov, 2019-03-17
@kirill-93

CI/CD (Continuous Integration/Continuous Delivery) server is the answer to your problems. For example, bitbucket pipelines, circle ci, gitlab pipelines, jenkins, etc. Works like this:
If the entire infrastructure is local, then the CI / CD server is usually installed locally, for example, Jenkins or TeamCity. But without a dedicated admin / devops, it’s probably easier to set up in the clouds.
PS This, of course, is suitable not only for projects on vue, but in general for any web, including the backend.

M
McBernar, 2019-03-17
@McBernar

You can use symlinks. Build in a new folder and link to it. Fraction of a second idle.

P
Pavel Didenko, 2019-03-17
@Dasslier

Normally, when developing, you will have several branches to work on. For example, if you work alone, then the dev and master branches are enough, on dev you develop on the local, on master you make a release with the current database from the battle, and if everything is fine, you merge the master branch with the combat server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question