2018-12-23 13:17:54 +00:00
|
|
|
FROM node:10 as frontend-builder
|
|
|
|
|
|
|
|
WORKDIR /frontend
|
|
|
|
COPY package.json package-lock.json /frontend/
|
|
|
|
RUN npm install
|
|
|
|
|
2019-06-23 08:33:52 +00:00
|
|
|
COPY client /frontend/client
|
|
|
|
COPY webpack.config.js /frontend/
|
2018-12-23 13:17:54 +00:00
|
|
|
RUN npm run build
|
|
|
|
|
2019-06-02 08:42:19 +00:00
|
|
|
FROM redash/base:debian
|
2015-09-30 21:19:22 +00:00
|
|
|
|
2018-10-11 11:12:28 +00:00
|
|
|
# Controls whether to install extra dependencies needed for all data sources.
|
|
|
|
ARG skip_ds_deps
|
|
|
|
|
2017-01-16 14:51:24 +00:00
|
|
|
# We first copy only the requirements file, to avoid rebuilding on every file
|
|
|
|
# change.
|
2019-05-26 11:56:03 +00:00
|
|
|
COPY requirements.txt requirements_bundles.txt requirements_dev.txt requirements_all_ds.txt ./
|
2018-10-11 11:12:28 +00:00
|
|
|
RUN pip install -r requirements.txt -r requirements_dev.txt
|
|
|
|
RUN if [ "x$skip_ds_deps" = "x" ] ; then pip install -r requirements_all_ds.txt ; else echo "Skipping pip install -r requirements_all_ds.txt" ; fi
|
2015-10-06 20:21:09 +00:00
|
|
|
|
2018-12-23 13:17:54 +00:00
|
|
|
COPY . /app
|
|
|
|
COPY --from=frontend-builder /frontend/client/dist /app/client/dist
|
2017-02-09 14:53:25 +00:00
|
|
|
RUN chown -R redash /app
|
2017-03-06 05:54:20 +00:00
|
|
|
USER redash
|
2015-10-08 19:09:24 +00:00
|
|
|
|
2017-01-16 14:51:24 +00:00
|
|
|
ENTRYPOINT ["/app/bin/docker-entrypoint"]
|
2018-12-23 13:17:54 +00:00
|
|
|
CMD ["server"]
|