fix: fix pipeline docker build with new external lib
This commit is contained in:
@@ -2,12 +2,23 @@ FROM node:current-alpine AS base
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS build
|
||||
COPY package*.json ./
|
||||
|
||||
# Copy and build dragon-item-parser first
|
||||
COPY dragon-item-parser/package*.json ./dragon-item-parser/
|
||||
COPY dragon-item-parser/tsconfig.json ./dragon-item-parser/
|
||||
COPY dragon-item-parser/src ./dragon-item-parser/src
|
||||
WORKDIR /app/dragon-item-parser
|
||||
RUN npm install && npm run build
|
||||
|
||||
# Build the frontend
|
||||
WORKDIR /app
|
||||
COPY frontend/package*.json ./frontend/
|
||||
WORKDIR /app/frontend
|
||||
RUN npm install
|
||||
COPY . .
|
||||
COPY frontend/. .
|
||||
RUN npm run build
|
||||
|
||||
FROM base
|
||||
COPY --from=build /app/.output /app/.output
|
||||
COPY --from=build /app/frontend/.output /app/.output
|
||||
EXPOSE 3000
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
|
||||
Reference in New Issue
Block a user