-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an additional node image that is responsible for generating the CSS and assets during build, which can then be copied into the build and service stages.
- Loading branch information
Showing
13 changed files
with
19 additions
and
50,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,25 @@ | ||
ARG NODE_VERSION=14 | ||
|
||
# A node container for generating the CSS and JS assets for the site, copying | ||
# in only the minimal files that are needed to do this. Once this is done, the | ||
# node dependencies can be installed using yarn, and Encore can be run to | ||
# generate the assets. | ||
FROM node:${NODE_VERSION} AS assets | ||
WORKDIR /app | ||
COPY package.json . | ||
COPY yarn.lock . | ||
COPY webpack.config.js . | ||
COPY source source | ||
RUN yarn install --frozen-lockfile | ||
|
||
FROM assets AS assets-build | ||
RUN yarn encore dev | ||
|
||
FROM opdavies/sculpin AS sculpin | ||
COPY composer.* ./ | ||
WORKDIR /app/source | ||
COPY --from=assets-build /app/source/build build | ||
|
||
FROM opdavies/sculpin-serve AS sculpin-watch | ||
COPY --from=sculpin /app . | ||
COPY . . | ||
|
Oops, something went wrong.