25 lines
524 B
Docker
25 lines
524 B
Docker
# --- Release image ---
|
|
FROM node:22-alpine AS release
|
|
RUN apk --no-cache add git
|
|
WORKDIR /home/node/app
|
|
|
|
RUN corepack enable
|
|
|
|
COPY ./dist/packages ./packages
|
|
|
|
COPY ./package.json ./
|
|
|
|
# Force node-modules linker (no .yarnrc.yml in build context)
|
|
RUN echo 'nodeLinker: node-modules' > .yarnrc.yml
|
|
|
|
RUN rm yarn.lock && yarn cache clean && yarn install --inmutable
|
|
|
|
RUN mkdir -p dist && ln -sf ../packages dist/packages
|
|
|
|
COPY ./entrypoint.sh ./
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
EXPOSE ${PORT:-3000}
|
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|