parent
9cb84afd04
commit
50ab574932
1 changed files with 13 additions and 10 deletions
@ -1,15 +1,18 @@ |
||||
FROM keymetrics/pm2:latest-alpine |
||||
FROM node:18 |
||||
|
||||
# Bundle APP files |
||||
COPY src src/ |
||||
COPY package.json . |
||||
COPY pm2.json . |
||||
# Create app directory |
||||
WORKDIR /usr/src/app |
||||
|
||||
# Install app dependencies |
||||
ENV NPM_CONFIG_LOGLEVEL warn |
||||
RUN npm install --production |
||||
# A wildcard is used to ensure both package.json AND package-lock.json are copied |
||||
# where available (npm@5+) |
||||
COPY package*.json ./ |
||||
|
||||
# Show current folder structure in logs |
||||
RUN ls -al -R |
||||
RUN npm install |
||||
# If you are building your code for production |
||||
# RUN npm ci --only=production |
||||
|
||||
CMD [ "pm2-runtime", "start", "pm2.json" ] |
||||
# Bundle app source |
||||
COPY . . |
||||
|
||||
CMD [ "node", "src/update.js" ] |
||||
|
Loading…
Reference in new issue