Cache yarn install during docker builds to improve subsequent build speeds

This commit is contained in:
hgw 2023-12-10 04:51:32 +00:00
parent 36e43b313b
commit 4c87370e64
Signed by: hgw
SSH Key Fingerprint: SHA256:diG7RVYHjd3aDYkZWHYcBJbImu+6zfptuUP+3k/wol4
1 changed files with 3 additions and 3 deletions

View File

@ -4,10 +4,10 @@ RUN apk add --no-cache --virtual=build-dependencies build-base git python3-dev &
USER node
WORKDIR /var/opt/hardlounge-src
ENV THELOUNGE_HOME /var/opt/hardlounge
COPY package.json yarn.lock .
RUN yarn install
COPY . .
#RUN git clone https://git.supernets.org/supernets/hardlounge.git --depth 1 .
RUN yarn install && \
NODE_ENV=production yarn build && \
RUN NODE_ENV=production yarn build && \
yarn link && \
yarn --non-interactive cache clean && \
ln -s /var/opt/hardlounge-src/index.js /var/opt/hardlounge-src/hardlounge