mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
Docker-Compose Memory Issue Fix? (#9285)
* Adding free memory nag / running npm build with development options in compose * Adding license
This commit is contained in:
@@ -41,18 +41,23 @@ RUN cd /app \
|
||||
######################################################################
|
||||
FROM node:10-jessie AS superset-node
|
||||
|
||||
ARG NPM_BUILD_CMD="build"
|
||||
ENV BUILD_CMD=${NPM_BUILD_CMD}
|
||||
|
||||
# NPM ci first, as to NOT invalidate previous steps except for when package.json changes
|
||||
RUN mkdir -p /app/superset-frontend
|
||||
RUN mkdir -p /app/superset/assets
|
||||
COPY ./docker/frontend-mem-nag.sh /
|
||||
COPY ./superset-frontend/package* /app/superset-frontend/
|
||||
RUN cd /app/superset-frontend \
|
||||
RUN /frontend-mem-nag.sh \
|
||||
&& cd /app/superset-frontend \
|
||||
&& npm ci
|
||||
|
||||
# Next, copy in the rest and let webpack do its thing
|
||||
COPY ./superset-frontend /app/superset-frontend
|
||||
# This is BY FAR the most expensive step (thanks Terser!)
|
||||
RUN cd /app/superset-frontend \
|
||||
&& npm run build \
|
||||
&& npm run ${BUILD_CMD} \
|
||||
&& rm -rf node_modules
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user