Closed rhyslbw closed 7 years ago
Thanks for the contribution! I ended up implementing these updates with gosu, so I don't need these changes anymore. But thanks for nudging me to finally get this taken care of!
Also, now that the app is being run by a non-root user, it can no longer run on port 80. So it now listens on port 3000 by default. The simple fix for that is you can map the ports when you docker run
the image with -p 80:3000
(which is -p HOST:CONTAINER
). Or better yet, you can (and probably should) put a reverse proxy like Nginx in front of the app.
Thanks again!
This is the first of some improvement PRs based on the following post:
https://nodesource.com/blog/8-protips-to-start-killing-it-when-dockerizing-node-js/
Seems to be good practice across all environments, not just production, so have included this in the base Dockerfile