mistercrunch opened a new pull request, #28784: URL: https://github.com/apache/superset/pull/28784
When using docker-compose, we mount the local drive and fire up a `npm run dev` which is effectively webpack in --watch mode, so that it looks for changes in frontend files and compiles-as-you-change interactively. `npm run build` is in the Dockerfile, specifically in the superset-node layer which is used to compile and later COPY the static assets into a python-based layer, `lean`. But in the context of docker-compose, we don't need all of it, and that `npm run build` has gotten expensive in terms of memory usage and takes a while to run. So in this PR I'm: - making `npm run build` optional with a dockerfile ARG (default is current behavior, but docker-compose skips it) - adding a `superset-node-base` layer for that superset-node service in docker-compose that runs `npm run dev`, ensuring the same base for both processes, but stopping/diverging prior to `npm ci` - making `npm install` run only if node_module is not present in the superset-node service. The user can simply `npm i` locally if/when they alter package.json. That speeds up firing up `docker-compose up` as unless you nuke node_modules/ it'll skip that step -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
