Skip to content

Commit

Permalink
Allow local yarn scripts for build override
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBCarter committed Oct 13, 2023
1 parent ccb6b01 commit a6ab81e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ ARG NODE_OPTIONS="--max_old_space_size=5120"
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn xy build
# If a local yarn script for build exists, use that override. Otherwise, use the default.
RUN if yarn run | yarn run | awk '{print $3}'| grep -q "^build$"; then yarn build; else yarn xy build; fi

# Just install the production dependencies here
FROM node:18 AS dependencies
Expand Down

0 comments on commit a6ab81e

Please sign in to comment.