Feature: Serve prod build via Nginx Docker container
Hey guys,
in another project of mine i extended the docker production build to serve the files in an nginx container, see here: https://github.com/TheDonDope/crudular#dockerization
In this issue i only want to gather opinions if this enhancement might also be interesting for the seed.
Thank you @sclausen for providing the nginx.conf here https://github.com/mgechev/angular-seed/pull/1522#issuecomment-255969000
//cc @mgechev @sclausen
Sure! Let's have this.
Alright, i'll push an PR tomorrow :)
I'm also using nginx to serve the static files but I'm considering dropping it in this particular case in favour of https://universal.angular.io
Have a look at the get started guide.
In my opinion, the setup should look like this:
+---------------------------------------+
| Reverse proxy |
| (nginx/haproxy/traefik/...) |
| Handles ssl, security headers, ... |
+---------------------------------------+
|
|
|
+------------------------------------+
| |
| |
| |
+-----(frontend container)----+ (other containers)
| | |
| Universal |
| | |
| Static files |
+-----------------------------+
Arguably, universal should not even be in the same container as the static files. But in this case, providing server-side rendering to every user of this repository might make it worth.
Hi @NicolasTr
Thank you for the input about angular/universal. Feel free to go ahead and issue a PR if you are willing :)