K
K
Konstantin2018-01-22 16:44:26
Angular
Konstantin, 2018-01-22 16:44:26

Angular Cli app continuous deployment how to do it right?

Greetings!
I am developing an application in Angular using Angular Cli, as a backend application in express.
There is a droplet on DigitalOcean with a configured server and a repository on BitBucket
The project structure is simple:
- src (Angular files)
- server (server application on express)
Directory where Angular Cli puts files when ng build --prod: server/public (instead of the default dist)
I see two solutions to run on :
1) Push to the repository (without the server/public folder), then clone the whole project on the production server, then install all the dependencies, build the angular cli and run the express application
2) Just build the project on the local machine, copy only the server folder to the droplet, then install only those dependencies that are needed for the express application and run it
. At the same time, I want to automate everything using some kind of script
The second way seems to me more minimalistic and attractive (less unnecessary files on the production server, fewer dependencies, fewer processes running there), but I have not seen a single tutorial on this type of setup. Perhaps I do not see any pitfalls in this way?!
I am new to this business, do not judge strictly :) I want the opinion of an experienced person. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2018-03-02
@kvzhkv

I don’t have much experience, I
’ll say that I use option 2, I’m not complaining, only there is still a jenkins that collects all this and uploads it to the server.
there is another option to deploy through docker

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question