Update to v 0.0.4
This commit is contained in:
29
Dockerfile
29
Dockerfile
@@ -1,2 +1,27 @@
|
||||
FROM node
|
||||
CMD ["node", "dist/lib/server/index.js"]
|
||||
# FROM node:20-alpine AS build
|
||||
# RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
|
||||
# WORKDIR /home/node/app
|
||||
# COPY package*.json .
|
||||
# COPY dist/lib .
|
||||
# USER node
|
||||
# RUN yarn install --frozen-lockfile --production
|
||||
# COPY --chown=node:node node_modules ./node_modules
|
||||
# CMD ["node", "dist/lib/server/index.js"]
|
||||
|
||||
FROM node:20-alpine AS build
|
||||
WORKDIR /home/node/app
|
||||
COPY package*.json ./
|
||||
COPY tsconfig.json ./
|
||||
COPY lib ./lib
|
||||
RUN ls -a
|
||||
RUN yarn install
|
||||
RUN yarn build:production
|
||||
|
||||
## this is stage two , where the app actually runs
|
||||
FROM node:20-alpine AS containerize
|
||||
WORKDIR /home/node/app
|
||||
COPY package*.json ./
|
||||
RUN yarn install --frozen-lockfile --production
|
||||
COPY --from=0 /home/node/app/dist .
|
||||
EXPOSE 80
|
||||
CMD ["node","server/index.js"]
|
||||
|
||||
Reference in New Issue
Block a user