fix: correct ceo-api Dockerfile port and dependency install
EXPOSE was 3000 but main.ts defaults PORT to 3001. npm install had no lockfile/legacy-peer-deps, which now fails on the @nestjs/swagger v8 vs @nestjs/common v11 peer conflict. Also adds .dockerignore so the build stage's node_modules isn't clobbered by a local one.
This commit is contained in:
parent
722113a359
commit
4372684f1b
2 changed files with 8 additions and 3 deletions
5
.dockerignore
Normal file
5
.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
node_modules
|
||||
dist
|
||||
.git
|
||||
.env
|
||||
*.log
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci --legacy-peer-deps
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
|
|
@ -11,5 +11,5 @@ ENV NODE_ENV=production
|
|||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY package.json ./
|
||||
EXPOSE 3000
|
||||
EXPOSE 3001
|
||||
CMD ["node", "dist/main"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue