video_translate/Dockerfile
Song367 4031d21dcc
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 28s
优化package
2026-03-18 15:22:37 +08:00

23 lines
491 B
Docker

FROM node:22.14.0-alpine3.21 AS build-stage
COPY ./ /app
WORKDIR /app
ENV NPM_CONFIG_REGISTRY=https://registry.npmmirror.com/
RUN npm install
COPY . .
ARG DEPLOY_ENV=prod
RUN if [ "$DEPLOY_ENV" = "test" ]; then \
npm run build ; \
else \
npm run build ; \
fi
# production stage
FROM nginx:1.27.4-alpine3.21 AS production-stage
RUN mkdir /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]