Skip to content

Commit 55e0e03

Browse files
committed
update
docker fix for production
1 parent 458b9c5 commit 55e0e03

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

Dockerfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,17 @@ FROM node:16-alpine
44
WORKDIR /service
55

66
COPY package*.json ./
7-
RUN npm install
87
COPY . .
9-
EXPOSE 443
108

119
# DEVELOPMENT
12-
ENV NODE_ENV development
13-
# Enable Volume in docker-compose.yml
14-
RUN npm install
15-
CMD ["nodemon", "npm", "start"]
10+
#ENV NODE_ENV development
11+
## Enable Volume in docker-compose.yml
12+
#RUN npm install
13+
#CMD ["npx", "nodemon", "npm", "start"]
1614

1715
# PRODUCTION
18-
#ENV NODE_ENV production
19-
#RUN npm install --production
20-
#RUN adduser --disabled-password myuser
21-
#USER myuser
22-
#CMD ["npm", "start"]
23-
#CMD ["npm", "test"]
16+
ENV NODE_ENV production
17+
RUN npm install --production
18+
RUN adduser --disabled-password myuser
19+
USER myuser
20+
CMD ["npm", "start"]

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42

53
employeeadmin:

0 commit comments

Comments
 (0)