JayGuAtGitHub edited a comment on issue #12304:
URL: https://github.com/apache/superset/issues/12304#issuecomment-755919525
> If you're running from port 9000 you're likely running the webpack debug
server. You should not be running the debug server in production as it is only
meant for debugging (hence the calls to debug files). Instead if you run `npm
run build` before building the docker container the production asset bundles
will be outputted to `/superset/static/assets` and the flask web server will be
serving them instead of the webpack dev server.
I'm running in the production envrionment (with port 8088). These steps can
explain how this problem appear:
Run "docker build -t my_customized_superset:latest ./" to build a local
docker image
in the Dockerfile
> FROM node:10-jessie AS superset-node
>
>......
>
>RUN cd /app/superset-frontend \
> && npm run ${BUILD_CMD} \
> && rm -rf node_modules
this command try to build the production js bundle
>FROM python:${PY_VER} AS lean
>
>......
>
>COPY --from=superset-node /app/superset/static/assets
/app/superset/static/assets
this command try to copy all production js bundle from "superset-node" to
"docker environment"
> COPY superset /app/superset
this command try to copy all python code from "packaging host machine
envrionment" to "docker environment", in this command, there are some debug js
file in the path superset/static/assets (I didn't check why it appears, I think
maybe it is generated by docker-compose up). In this situation, the debug js is
packaged into producton docker environment. And the js paths were put in the
end of the dashboard page html.
I think another reason which cause the problem is that I don't have a CI
envrionment. This won't appear in that envrionment beacause CI envionment will
never pull the debug js and will never send the files to production
environment. Maybe not all project can have a standard workflow especially for
those quick-online startup project. Maybe this promotion can help those people
to avoid some wired bugs. ( I have to say if you don't master webpack and
docker at the same time, it's really hard to find the problem. Maybe the only
way it clone project again-change the code-package)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]