| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 | # base imageFROM node:20.11-alpine3.19 AS baseLABEL maintainer="takatost@gmail.com"RUN apk add --no-cache tzdata# install packagesFROM base as packagesWORKDIR /app/webCOPY package.json .COPY yarn.lock .RUN yarn install --frozen-lockfile# if you located in China, you can use taobao registry to speed up# RUN yarn install --frozen-lockfile --registry https://registry.npm.taobao.org/# build resourcesFROM base as builderWORKDIR /app/webCOPY --from=packages /app/web/ .COPY . .RUN yarn build# production stageFROM base as productionENV NODE_ENV productionENV EDITION SELF_HOSTEDENV DEPLOY_ENV PRODUCTIONENV CONSOLE_API_URL http://127.0.0.1:5001ENV APP_API_URL http://127.0.0.1:5001ENV PORT 3000# set timezoneENV TZ UTCRUN ln -s /usr/share/zoneinfo/${TZ} /etc/localtime \    && echo ${TZ} > /etc/timezone# global runtime packagesRUN yarn global add pm2 \    && yarn cache cleanWORKDIR /app/webCOPY --from=builder /app/web/public ./publicCOPY --from=builder /app/web/.next/standalone ./COPY --from=builder /app/web/.next/static ./.next/staticCOPY docker/pm2.json ./pm2.jsonCOPY docker/entrypoint.sh ./entrypoint.shARG COMMIT_SHAENV COMMIT_SHA ${COMMIT_SHA}EXPOSE 3000ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]
 |