feat: optimize multi platform image build (#754)

This commit is contained in:
takatost
2023-08-05 17:23:57 +08:00
committed by GitHub
parent 6a7a71af1f
commit 491d29cc87
6 changed files with 16 additions and 262 deletions

View File

@@ -1,7 +1,8 @@
FROM langgenius/base:1.0.1-bullseye-slim
FROM node:18.17.0-alpine
LABEL maintainer="takatost@gmail.com"
ENV NODE_ENV=production
ENV EDITION SELF_HOSTED
ENV DEPLOY_ENV PRODUCTION
ENV CONSOLE_API_URL http://127.0.0.1:5001
@@ -13,6 +14,8 @@ WORKDIR /app/web
COPY package.json /app/web/package.json
RUN npm install pm2 -g
RUN npm install --only=prod
COPY . /app/web/
@@ -26,4 +29,4 @@ RUN chmod +x /entrypoint.sh
ARG COMMIT_SHA
ENV COMMIT_SHA ${COMMIT_SHA}
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]