Comments (2)
Hey there, @jtcurlin! I'm Dosu, a bot here to help you with bugs, questions, and becoming a contributor. Let's squash those bugs together! ๐ค
To prevent the frontend build from running in Docker when setting BUILD_SUPERSET_FRONTEND_IN_DOCKER
to false
within the .env
file, you need to ensure that the Dockerfile and related scripts respect this environment variable.
Currently, setting BUILD_SUPERSET_FRONTEND_IN_DOCKER
to false
only affects the docker/docker-frontend.sh
script, which skips the frontend build steps and outputs the message "Skipping frontend build steps - YOU RUN IT MANUALLY ON THE HOST!" [1].
However, the npm run build
command in the Dockerfile is not conditional on this environment variable. To address this, you can modify the Dockerfile to conditionally run the frontend build based on the BUILD_SUPERSET_FRONTEND_IN_DOCKER
variable. Here is an example of how you can modify the Dockerfile:
# Dockerfile
ARG BUILD_SUPERSET_FRONTEND_IN_DOCKER=true
# Other Dockerfile steps...
# Conditionally run the frontend build
RUN if [ "$BUILD_SUPERSET_FRONTEND_IN_DOCKER" = "true" ]; then npm run build; else echo "Skipping frontend build"; fi
This modification ensures that the frontend build only runs if BUILD_SUPERSET_FRONTEND_IN_DOCKER
is set to true
.
Additionally, if you have less than 16GB of memory, running the frontend build locally can be much faster. You can do this by navigating to the superset-frontend
directory and running:
npm install
npm run dev
This will install the necessary dependencies and start the development server for the frontend, allowing you to see changes in real-time [1].
For more details on the recent changes to the Dockerfile that might affect the frontend build process, you can refer to the specific updates such as the Node version update, NPM build command argument, memory management script, and translation files handling [2].
To continue talking to Dosu, mention @dosu.
from superset.
hey, this is a bit confusing, but BUILD_SUPERSET_FRONTEND_IN_DOCKER
affects a subsequent build step in docker/docker-frontend.sh
, that's related to firing up docker-compose
. The step you refer to above happens much earlier in the docker build process.
Essentially our dev setup is based on our docker builds, and part of that multi-stage / target docker build that somewhere upstreams builds the frontend bundle, only to throw it away / redo it in the late docker-compose
build step as npm run dev
, which operates off a mount and removes the need for that upstream build.
It would be nice to make that step optional upstream perhaps, but could create other kind of confusion an conflicts. Wondering if simply adding an ARG in our main dockerfile based on BUILD_SUPERSET_FRONTEND_IN_DOCKER
would have any downsides (?)
Also hoping that in many cases you could docker pull
and operate from cache instead of locally building that layer.
from superset.
Related Issues (20)
- No module named 's3cache' HOT 8
- "user_favorite_tag" table not created after "superset db upgrade" when upgrade superset 3.0.1 to 4.0.2 on docker HOT 11
- [SIP-143] Global Async Task Framework HOT 15
- Hash mismatch error during build part of docker installation HOT 3
- [4.0.2] SQL LAB int argument error since version 4 HOT 3
- Bug crossing lines in line/area chart HOT 2
- Slack HOT 4
- Duplicated entries in Alerts & Reports execution log HOT 1
- /api/v1/dashboard/{id_or_slug}/copy with "duplicate_slices" = true not working because The "json_metadata" take from /api/v1/dashboard/{id_or_slug} doesn't have "positions" HOT 4
- Bar Chart: Bar Chart Echart X Axis and Y Axis labels not showing HOT 3
- The default URL generated by Dashboard has security risks๏ผ HOT 22
- Advanced Period filter bug HOT 2
- Switching languages doesn't take effect on some menu elements if BABEL_DEFAULT_LOCALE is not "en" HOT 11
- ENABLE_JAVASCRIPT_CONTROLS use HOT 2
- [SIP-144] Proposal to Integrate VisActor Visualization Plugin into Superset HOT 2
- Dashboard Color Scheme keeps changing every refresh HOT 4
- Bug: fetchGuestToken function is not called after internet is disconnected and error is encountered during embedded report access HOT 3
- The in-memory storage for tracking rate limits HOT 14
- Filtered values not appearing/not working after selected from dropdown Post Migration to Latest SS Version HOT 6
- Proxy is unable to function properly HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superset.