Skip to content

Commit

Permalink
config for swarm
Browse files Browse the repository at this point in the history
  • Loading branch information
juanda99 committed May 22, 2023
1 parent f164516 commit 71eb743
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
FROM node:14-buster
LABEL maintainer="juandacorreo@gmail.com"

ENV NODE_ENV=development
ENV PORT=80
ENV NODE_ENV=production
ENV PORT=3000

# Set working directory
RUN mkdir /app
WORKDIR /app
ENV HOME=/app

# Install dependencies
COPY ./package.json ./package-lock.json $HOME/
# Bundle app source
COPY . .

# Install app dependencies
COPY package*.json ./
RUN npm install -g node-gyp
RUN npm install
RUN npm install --production

EXPOSE $PORT

USER node

# Run this app when a container is launched
# base image entrypoint will add node command
CMD [ "svgwatcher.js" ]

0 comments on commit 71eb743

Please sign in to comment.