City-of-Bloomington / open311-nodejs

A citizen facing Open311 client written in Node
1 stars 2 forks source link

Use docker for development version as well #69

Open inghamn opened 4 years ago

inghamn commented 4 years ago

Right now, the dockerfile does an npm install. This means if you want to do new coding or test new library versions, you cannot deploy using this dockerfile.

It would be nice to be able to use the same dockerfile for all types of deployments. This means the npm install must not be part of the build. Rather, it is the developer's job to install whatever versions of dependencies are desired before doing a build.

inghamn commented 4 years ago

The dockerfile (and future ansible playbook) will deploy what the Makefile builds. This allows you to deploy stuff thats work in progress, in order to try out changes to the source code.

sethCOB commented 4 years ago

It would be nice to be able to use the same dockerfile for all types of deployments. This means the npm install must not be part of the build. Rather, it is the developer's job to install whatever versions of dependencies are desired before doing a build.

One thing to investigate is that npm install seems to set up its files in a platform-specific way. Adam and I found early on that deploying the node modules folder from his Macbook onto the linux container image resulted in node throwing a ton of errors and failing to load a lot of the modules.

This may not be the case anymore as I haven't tried since the early days of our containerization of this project, but I figured I'd bring it up as a potential caveat.