Skip to content

Commit

Permalink
fix: remove --no-optional from docker-compose build (apache#29779)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Jul 30, 2024
1 parent 525e837 commit 6bf8596
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ services:
environment:
# set this to false if you have perf issues running the npm i; npm run dev in-docker
# if you do so, you have to run this manually on the host, which should perform better!
BUILD_SUPERSET_FRONTEND_IN_DOCKER: true
SCARF_ANALYTICS: "${SCARF_ANALYTICS:-}"
container_name: superset_node
command: ["/app/docker/docker-frontend.sh"]
Expand Down
10 changes: 7 additions & 3 deletions docker/docker-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = "false" ]; then
fi

if [ "$BUILD_SUPERSET_FRONTEND_IN_DOCKER" = "true" ]; then
echo "Building Superset frontend in dev mode inside docker container"
cd /app/superset-frontend
npm install -f --no-optional --global webpack webpack-cli
npm install -f

echo "Running `npm install`"
npm install

echo "Running frontend"
npm run dev

else
echo "Skipping frontend build steps - YOU RUN IT MANUALLY ON THE HOST!"
echo "Skipping frontend build steps - YOU NEED TO RUN IT MANUALLY ON THE HOST!"
echo "https://superset.apache.org/docs/contributing/development/#webpack-dev-server"
fi

0 comments on commit 6bf8596

Please sign in to comment.