jamf / scout-public

A tool to aggregate devices across multiple MDM servers
GNU General Public License v3.0
11 stars 3 forks source link

Dockerize Services & App #26

Closed alex-stout closed 5 years ago

alex-stout commented 5 years ago

This PR eases the burden of installation of the key services using Docker.

Here is the itemized list of changes:

In the future I will add Dockerization for the production install. There's going to have to be a discussion on whether or not that is something that should be done. There's more to consider with this approach for that use case.

Note: I wasn't able to find the issue reference for this.

alex-stout commented 5 years ago

Just updated to add persistence to the databases. Now on initial startup, volumes will be mounted to api/data-volumes which will contain the data for both the SQL and NoSQL database. This allows for the services to be shutdown and re-run without data loss.

battlecow commented 5 years ago

@alex-stout Should exclude the package-lock file from this set of changes.

alex-stout commented 5 years ago

@battlecow I've removed the package-lock file from the change list. I've also added a Dockerfile and .dockerignore for the app itself (not the services).

battlecow commented 5 years ago

My thought here is if we are going to include a Dockerfile we should at a minimum run it as non-root user since node is added upstream. Added a gist of my thoughts: https://gist.github.com/battlecow/7d98a64088e9ed3a2fb9283700a19fea If the container is meant for dev the NODE_ENV could be removed, wasn't really sure if the intent is to use it for prod or dev.

alex-stout commented 5 years ago

Updated to run as non-root user. I kept in NODE_ENV = "development" to be explicit that this is meant for development only. If this Docker configuration is deemed "production" ready, that could be changed. Thank you for the input, that helps a lot.