Issue Summary
I’m trying to run frontend docker container separately.
I splited redash codebase into server side and client side.
I set up as following.
-
I didn’t configure server-side static files path.
-
.env
REDASH_BACKEND=“http://my-backend-ip:5000”
- Dockerfile
FROM node:14.17 as frontend-builder
RUN npm install --global --force yarn@1.22.10
# Controls whether to build the frontend assets
ARG skip_frontend_build
ENV CYPRESS_INSTALL_BINARY=0
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
RUN useradd -m -d /frontend redash
USER redash
WORKDIR /frontend
COPY --chown=redash package.json yarn.lock .yarnrc /frontend/
COPY --chown=redash viz-lib /frontend/viz-lib
# Controls whether to instrument code for coverage information
ARG code_coverage
ENV BABEL_ENV=${code_coverage:+test}
RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn --frozen-lockfile --network-concurrency 1; fi
COPY --chown=redash client /frontend/client
COPY --chown=redash webpack.config.js /frontend/
RUN if [ "x$skip_frontend_build" = "x" ] ; then yarn build; else mkdir -p /frontend/client/dist && touch /frontend/client/dist/multi_org.html && touch /frontend/client/dist/index.html; fi
- docker-compose.yml
version: "2.2"
x-redash-service: &redash-service
build:
context: .
# dockerfile: Dockerfile path
volumes:
- ./package.json:/frontend/package.json
- ./yarn.lock:/frontend/yarn.lock
- ./.yarnrc:/frontend/.yarnrc
- ./.yarn:/frontend/.yarn
- ./webpack.config.js:/frontend/webpack.config.js
- ./client:/frontend/client
- ./viz-lib:/frontend/viz-lib
env_file:
- .env
services:
frontend:
<<: *redash-service
command: yarn start
ports:
- "8080:8080"
Docker-compose logs seem fine, but nothing showed up in browser.
Technical details:
- Redash Version: master branch (e6ebef1e5ab866ce1e706eaee6260edaffdc2bd7)
- Browser/OS:Chrome / macOS Monterey 12.2.1 (M1)
- How did you install Redash: docker-compose