2022-09-22 21:54:15 +08:00
|
|
|
FROM local/webpack-builder
|
2022-09-24 03:26:58 +08:00
|
|
|
|
2022-09-26 21:55:24 +08:00
|
|
|
RUN \
|
|
|
|
--mount=type=bind,from=local/cache-helper,source=/tmp/dst,target=/cache-helper \
|
|
|
|
--mount=type=bind,from=local/webpack-assets-previous,target=/mount/webpack-assets-previous \
|
2022-09-27 05:07:08 +08:00
|
|
|
--mount=type=bind,from=local/webpack-cache-previous,target=/mount/webpack-cache-previous \
|
2022-09-24 03:26:58 +08:00
|
|
|
tar --no-same-owner -xf /cache-helper/webpack-runner-dependencies.tar -C ${APP_HOME} && \
|
2022-11-30 21:12:43 +08:00
|
|
|
tar --no-same-owner -xf /cache-helper/webpack-runner-vendor.tar -C ${APP_HOME} && \
|
2023-08-24 03:02:08 +08:00
|
|
|
if [ -n "$(tar tf /cache-helper/webpack-runner-vendor.tar)" ]; then bundle config --global frozen false ; fi && \
|
2022-09-26 21:55:24 +08:00
|
|
|
tar --no-same-owner -xf /cache-helper/webpack-runner.tar -C ${APP_HOME} && \
|
2022-09-27 05:07:08 +08:00
|
|
|
{ { cd /mount/webpack-assets-previous/usr/src/app && cp --parents -rf public/dist/brandable_css ${APP_HOME}; } || true; } && \
|
|
|
|
{ { cd /mount/webpack-cache-previous && cp --parents -rf node_modules/.cache ${APP_HOME}; } || true; }
|
2022-09-22 21:54:15 +08:00
|
|
|
|
2024-01-30 04:12:25 +08:00
|
|
|
ARG SKIP_SOURCEMAPS=0
|
2022-09-22 21:54:15 +08:00
|
|
|
ARG RAILS_LOAD_ALL_LOCALES=0
|
2022-09-27 05:07:08 +08:00
|
|
|
ARG USE_BUILD_CACHE=0
|
|
|
|
ARG WRITE_BUILD_CACHE=0
|
2022-09-22 21:54:15 +08:00
|
|
|
ARG CRYSTALBALL_MAP=0
|
|
|
|
RUN COMPILE_ASSETS_API_DOCS=0 \
|
|
|
|
COMPILE_ASSETS_BRAND_CONFIGS=0 \
|
|
|
|
COMPILE_ASSETS_NPM_INSTALL=0 \
|
|
|
|
COMPILE_ASSETS_STYLEGUIDE=0 \
|
2024-01-30 04:12:25 +08:00
|
|
|
SKIP_SOURCEMAPS="$SKIP_SOURCEMAPS" \
|
2022-09-22 21:54:15 +08:00
|
|
|
RAILS_LOAD_ALL_LOCALES="$RAILS_LOAD_ALL_LOCALES" \
|
2022-09-27 05:07:08 +08:00
|
|
|
USE_BUILD_CACHE="$USE_BUILD_CACHE" \
|
|
|
|
WRITE_BUILD_CACHE="$WRITE_BUILD_CACHE" \
|
2022-09-22 21:54:15 +08:00
|
|
|
CRYSTALBALL_MAP="$CRYSTALBALL_MAP" \
|
|
|
|
bundle exec rails canvas:compile_assets
|