Skip to content

Commit

Permalink
precompile assets in container build process
Browse files Browse the repository at this point in the history
ports the parts of #4496 that relate to container build. installs UV via rails
asset precompile.

this makes `.dassie` pass the one test that depends on UV's presence. it's also
needed generally for UV in the docker development and test environments.
  • Loading branch information
tamsin johnson committed Oct 29, 2020
1 parent 35a828d commit b5ba15e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ RUN apk --no-cache upgrade && \
apk --no-cache add build-base \
tzdata \
nodejs \
yarn \
$DATABASE_APK_PACKAGE \
$EXTRA_APK_PACKAGES

Expand Down Expand Up @@ -35,6 +36,7 @@ ARG BUNDLE_WITHOUT="development test"

ONBUILD COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
ONBUILD RUN bundle install --jobs "$(nproc)"
ONBUILD RUN DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile


FROM hyrax-base as hyrax-engine-dev
Expand All @@ -46,3 +48,4 @@ COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
COPY --chown=1001:101 . /app/samvera/hyrax-engine

RUN cd /app/samvera/hyrax-engine; bundle install --jobs "$(nproc)"
RUN DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile

0 comments on commit b5ba15e

Please sign in to comment.