16 lines
320 B
Docker
16 lines
320 B
Docker
|
|
FROM node:18 AS dependencies
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm install
|
|
|
|
# image for development
|
|
FROM dependencies AS dev
|
|
CMD ["npm", "run", "dev", "--" ,"--port", "3000", "--host", "0.0.0.0"]
|
|
|
|
FROM dependencies AS build
|
|
COPY . ./
|
|
RUN npm run build -- --mode production
|
|
|
|
CMD [ "node", "/app" ]
|