mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-10 10:11:47 +00:00
Update Dockerfile
This commit is contained in:
10
Dockerfile
10
Dockerfile
@ -1,18 +1,20 @@
|
||||
FROM node:20 AS build
|
||||
WORKDIR /usr/src/app
|
||||
COPY package.json .
|
||||
RUN npm install && npm install typescript -g
|
||||
COPY yarn.lock .
|
||||
RUN yarn install --development
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN yarn run build
|
||||
|
||||
FROM node:20-alpine
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package.json .
|
||||
RUN npm install --production
|
||||
RUN yarn install --production
|
||||
|
||||
COPY --from=build /usr/src/app/dist dist
|
||||
COPY --from=build /usr/src/app/build build
|
||||
|
||||
EXPOSE 8025
|
||||
CMD ["npm", "run", "start"]
|
||||
CMD ["node", "dist/server.js"]
|
||||
Reference in New Issue
Block a user