修改以适应github工作流
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -2,34 +2,11 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
RUN corepack enable
|
||||
|
||||
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
|
||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm i
|
||||
|
||||
# Copy the entire project
|
||||
COPY . ./
|
||||
|
||||
# Build the project
|
||||
RUN chmod +x patch-ui-pro.zsh && ./patch-ui-pro.zsh
|
||||
RUN pnpm run build
|
||||
|
||||
# Build Stage 2
|
||||
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
|
||||
# Only `.output` folder is needed from the build stage
|
||||
COPY --from=build /app/.output/ ./
|
||||
COPY .output ./.output
|
||||
|
||||
# Change the port and host
|
||||
ENV PORT=3000
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "/app/server/index.mjs"]
|
Reference in New Issue
Block a user