tomastrajan / angular-ngrx-material-starter

Angular, NgRx, Angular CLI & Angular Material Starter Project
https://tomastrajan.github.io/angular-ngrx-material-starter
MIT License
2.82k stars 919 forks source link

It will be good to have a Dockerfile for run the project inside docker container #385

Closed shootermv closed 5 years ago

shootermv commented 5 years ago

Describe the feature you'd like:

It will be good to have a Dockerfile for run the project inside docker container Im newbie in docker and devops stuff, so if im right (and dockerfile it is good idea) - i will be happy to try to do pr

Other information:

I would be willing to submit a PR to fix this issue:

[ ] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

tomastrajan commented 5 years ago

@shootermv I also don't have much docker experience but if it is possible just to add a Dockerfile which enables users to run it in container while not influencing the base use case of running stuff with npm then I am in favor of such an addition :)

DinoSourcesRex commented 5 years ago

@tomastrajan I've created a new docker-compose and dockerfile that seem production ready to me. It uses a multi-stage dockerfile to build the image for, hopefully, a quicker build on dev machines. Another benefit of the multi-stage files is that the final image should be much smaller then the build image as it only includes the vital stuff for serving. It should also let people easily host their site.

I have not managed to create a separate stage / image for running any testing. I had issues getting chrome or chrome headless working in there so I just didn't as I didn't need to do that locally.


The implementation raises a few issues, mainly that I have modified the server.js as well as creating 2 new docker related files (Production.Dockerfile and Production.docker-compose.yml).

I can raise a PR if this is something that is of interest, just let me know.

PS I also upgraded it to using node 11.1 with no issues that I saw at least.

tomastrajan commented 5 years ago

@DinoSourcesRex please feel free to submit a PR :)

netlander commented 4 years ago

Having problems deploying to Docker.

Where would the Docker scripts mentioned above be found?