Refactor docker, fix unhandled error #64
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to work on #52 but realized it would be better to fix the Docker images after the refactor in #51.
I also noticed an unhandled error and improved logging messages.
Single Dockerfile in monorepo root
I realized that with the addition of
common
package, the previous approach does not work. The fix would be very similar to https://pnpm.io/docker#example-2-build-multiple-docker-images-in-a-monorepo so I decided to go with their suggestion. In case we need to add Redis (or other container) we can use docker-compose to run the containers together and still use the common Dockerfile to built the packages. For example:Unfortunately, their example was broken and their documentation around monorepo + docker was not very good. In the end I managed to get it working. You can read the details in the Dockerfile (inline) docs. LMK if there is something unclear.
Removed source map support
I realized that we don't need the package for some time (after node 12). There is a note though about source maps not working correctly when using
vm
package which we use for pre/post processing. For these the source maps will not work.