Answer the question
In order to leave comments, you need to log in
Are there recipes for deploying Angular applications?
Who can share recipes for deploying Angular applications? Before that, I used statics on VDS using nginx, but as I understood from the very beginning, this is an extremely inefficient way to manage projects in angular, I decided to switch to apache - I know its disadvantages, but I think there are more resources about it, so I ask about it , if anyone has information on nginx, it’s also good, I want to do it without crutches and bicycles.
Answer the question
In order to leave comments, you need to log in
The first thing they forget about when deploying statics is http caching.
You can’t just take and replace the files in your daddy with new ones.
Under heavy load, they are not immediately displayed in the browser.
An adequate way to solve this problem is to use random prefixes/suffixes in resource names, and change in subsequent versions.
Works out of the box in yeoman and angular-generator. Thus, there is no need to completely clear the cache and block the server at the time of deployment. The maximum is to clear the cache from index'a.
Nginx vs Apache... "Extremely inefficient way to manage projects"
What does a web server have to do with deployment and project management tools?
Get familiar with nginx - it's much better for statics.
In general, Angular deploys like any other project.
Port the project to Yeoman
Start a Gitlab or host somewhere (github/bitbucket)
Write a post-receive hook for Git on whatever is convenient
Deploy via git pull
sorry ... but where does the deployment? and what did nginx not please?
How I do it: on a separate server, on command (by push, according to the schedule), a build is made through a grant. Then this build is uploaded via scp to the server and ... that's it .... Using apache to return statics is unreasonable, there will only be a lot of problems with it. There is plenty of information about nginx, and given that you only need static, the maximum that can be done is to set up a redirect to index.html with all the crooked requests, etc.
Nginx is MUCH better at distributing static than Apache, where do such thoughts come from?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question