Skip to content

Commit

Permalink
fix envs
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Dec 26, 2023
1 parent 350dba2 commit 37996fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ RUN runDeps="openssl ca-certificates patch gosu git make tmux locales-all" \
USER node

ARG MAX_OLD_SPACE_SIZE=8192
ARG RAZZLE_PREFIX_PATH=/freshwater
ENV RAZZLE_PREFIX_PATH /freshwater
ENV NODE_OPTIONS=--max_old_space_size=$MAX_OLD_SPACE_SIZE

RUN yarn \
&& RAZZLE_PREFIX_PATH=$RAZZLE_PREFIX_PATH yarn build \
&& RAZZLE_PREFIX_PATH=RAZZLE_PREFIX_PATH yarn build \
&& rm -rf /home/node/.cache \
&& rm -rf /home/node/.yarn \
&& rm -rf /home/node/.npm \
Expand All @@ -34,4 +32,4 @@ USER root
EXPOSE 3000 3001

ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["sh", "-c", "RAZZLE_PREFIX_PATH=${RAZZLE_PREFIX_PATH}","yarn", "start:prod"]
CMD ["yarn", "start:prod"]
6 changes: 3 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
set -Ex

function apply_rebuild {
mkdir -p /app/src/addons
gosu node yarn develop
#mkdir -p /app/src/addons
#gosu node yarn develop
gosu node yarn
gosu node yarn build
gosu node RAZZLE_PREFIX_PATH=$RAZZLE_PREFIX_PATH yarn build
}

# Should we re-build
Expand Down

0 comments on commit 37996fc

Please sign in to comment.