Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
docker fix for production
  • Loading branch information
saadshams committed Aug 27, 2024
1 parent 458b9c5 commit 55e0e03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
21 changes: 9 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@ FROM node:16-alpine
WORKDIR /service

COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 443

# DEVELOPMENT
ENV NODE_ENV development
# Enable Volume in docker-compose.yml
RUN npm install
CMD ["nodemon", "npm", "start"]
#ENV NODE_ENV development
## Enable Volume in docker-compose.yml
#RUN npm install
#CMD ["npx", "nodemon", "npm", "start"]

# PRODUCTION
#ENV NODE_ENV production
#RUN npm install --production
#RUN adduser --disabled-password myuser
#USER myuser
#CMD ["npm", "start"]
#CMD ["npm", "test"]
ENV NODE_ENV production
RUN npm install --production
RUN adduser --disabled-password myuser
USER myuser
CMD ["npm", "start"]
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:

employeeadmin:
Expand Down

0 comments on commit 55e0e03

Please sign in to comment.