This repository has been archived on 2023-05-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
auth/Dockerfile
2023-05-04 11:17:52 -04:00

28 lines
758 B
Docker

# 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"]