|
FROM node:lts AS BUILD_IMAGE |
|
|
|
|
|
RUN apt-get update && apt-get install -y git |
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN git clone https://github.com/renqabs/dfa.git /app |
|
|
|
|
|
RUN yarn install --registry https://registry.npmmirror.com/ && yarn run build |
|
|
|
FROM node:lts-alpine |
|
|
|
|
|
COPY --from=BUILD_IMAGE /app/dist /app/dist |
|
COPY --from=BUILD_IMAGE /app/package.json /app/package.json |
|
COPY --from=BUILD_IMAGE /app/public /app/public |
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN yarn install --production --registry https://registry.npmmirror.com/ |
|
|
|
|
|
RUN mkdir -p /app/logs && chmod 777 /app/logs |
|
|
|
|
|
ENV PORT 7860 |
|
|
|
|
|
EXPOSE $PORT |
|
|
|
|
|
CMD ["node", "dist/index.js", "--port", "7860"] |