Team Ai
Apppublic

Underground-Digital/Workflow-Engine

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Dockerfile73 linesDownload Raw Back to web
1# base image2FROM node:20.11-alpine3.19 AS base3LABEL maintainer="takatost@gmail.com"4 5# if you located in China, you can use aliyun mirror to speed up6# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories7 8RUN apk add --no-cache tzdata9 10 11# install packages12FROM base AS packages13 14WORKDIR /app/web15 16COPY package.json .17COPY yarn.lock .18 19# if you located in China, you can use taobao registry to speed up20# RUN yarn install --frozen-lockfile --registry https://registry.npmmirror.com/21 22RUN yarn install --frozen-lockfile23 24# build resources25FROM base AS builder26WORKDIR /app/web27COPY --from=packages /app/web/ .28COPY . .29 30RUN yarn build31 32 33# production stage34FROM base AS production35 36ENV NODE_ENV=production37ENV EDITION=SELF_HOSTED38ENV DEPLOY_ENV=PRODUCTION39ENV CONSOLE_API_URL=http://127.0.0.1:500140ENV APP_API_URL=http://127.0.0.1:500141ENV PORT=300042ENV NEXT_TELEMETRY_DISABLED=143 44# set timezone45ENV TZ=UTC46RUN ln -s /usr/share/zoneinfo/${TZ} /etc/localtime \47    && echo ${TZ} > /etc/timezone48 49 50WORKDIR /app/web51COPY --from=builder /app/web/public ./public52COPY --from=builder /app/web/.next/standalone ./53COPY --from=builder /app/web/.next/static ./.next/static54 55COPY docker/pm2.json ./pm2.json56COPY docker/entrypoint.sh ./entrypoint.sh57 58 59# global runtime packages60RUN yarn global add pm2 \61    && yarn cache clean \62    && mkdir /.pm2 \63    && chown -R 1001:0 /.pm2 /app/web \64    && chmod -R g=u /.pm2 /app/web65 66 67ARG COMMIT_SHA68ENV COMMIT_SHA=${COMMIT_SHA}69 70USER 100171EXPOSE 300072ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]73