angular-enterprise-example
angular-enterprise-example copied to clipboard
Deploy demo instance (using Docker)
I would love to see some best practices for how to deploy this example, and hopefully be able to address questions similar to the following?
- How would you put this application into a container?
- Would you put each application into its own container?
- Would you separate the servers-side from the front-end?
This is a good idea, and well-suited for the ideas in this example. About the questions you raised specifically, I don't think it is feasible to show "best practices", because there are wide and the human disagreements on what the best practices are. Deployment preferences seem to be very strongly local from organization to organization. For example you mentioned containers. At some organizations there is a preference for a large number of very small containers, but other organizations the opposite, and there are other organizations which are very successful and avoid containers completely (using something like lightweight virtual machines to reduce the total layering overhead versus containers).
So if I can come up with a way to show things here in this example, I would instead aim to show several alternative approaches rather than try to pick a best practice.
Here's what I have in mind. Since this update from last summer above, I've used containers more, and can more fluently demonstrate them. My plan is actually to build the containers a couple of different ways, just to illustrate what is possible.
Path 1: One
- One container for the Node server, including serving the client, suitable for demo and small deployment
Path 2: server, client
- One container for the Node server, a second container that serves the static client files, built on an off-the-shelf nginx base container or similar
Path 3: many
- container for the Node server
- container for a database
- container for the admin app static files
- container for the portal app static files
- container for the agent app static files
- container for a Java server
- container for a .NET (the new "core" that easily runs on Linux and containers) server
Additional thoughts:
Once these are built as containers, deploy them to a public cloud. Perhaps the Google Cloud, which I have already been using in commercial work to deploy containers. This takes really very very little effort, and would result in a running instance that anyone could play with.