add dockerfile and build file
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM node:22
|
||||
COPY build/ /home/node/app
|
||||
ENTRYPOINT ["node", "build/index.js"]
|
||||
|
||||
|
||||
|
||||
FROM node:22 as builder
|
||||
COPY . /src/
|
||||
WORKDIR /src/
|
||||
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
RUN cp package.json ./build/package.json
|
||||
RUN cp package-lock.json ./build/package-lock.json
|
||||
RUN cd build && npm ci --production
|
||||
RUN rm package.json && rm package-lock.json
|
||||
|
||||
FROM node:22 as runner
|
||||
|
||||
COPY --from=builder /src/build/ /home/node/app
|
||||
ENTRYPOINT [ "node", "/home/node/app/index.js" ]
|
Reference in New Issue
Block a user