-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
38 lines (34 loc) · 1.07 KB
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# /*******************************************************************************
# *
# * Copyright (c) {2022-2023} Francois J. Aouad.
# * All rights reserved. This program and the accompanying materials
# * are made available under the terms of the GNU General Public License v3.0
# * which accompanies this distribution, and is available at
# * https://www.gnu.org/licenses/gpl-3.0.en.html
# *
# *******************************************************************************/
# FROM node:alpine AS development
# WORKDIR /usr/src/app
# COPY package*.json ./usr/src/app
# RUN npm install
# COPY . /usr/src/app
# RUN npm run build
# FROM node:alpine as production
# ARG NODE_ENV=production
# ENV NODE_ENV=${NODE_ENV}
# WORKDIR /usr/src/app
# COPY package*.json /usr/src/app
# RUN npm install --omit=dev
# COPY . /usr/src/app
# COPY --from=development /usr/src/app/dist ./dist
# CMD ["node", "dist/main"]
FROM node:alpine
WORKDIR /app
#COPY PACKAGE JSON FILES
COPY package*.json /app
#install files
RUN npm i
#copy source file
COPY . /app
EXPOSE 5021
CMD ["npm", "run", "start"]