Commit 2950d2ee authored by Yoann HOUPERT's avatar Yoann HOUPERT

use pm2 for multi processing management

parent 9771403d
Pipeline #6812 passed with stage
in 1 minute and 20 seconds
FROM node:8-slim
RUN apt-get update && apt-get install -y wget --no-install-recommends \
&& apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge --auto-remove -y curl \
&& rm -rf /src/*.deb
WORKDIR /usr/src/app/linstt-poc
COPY package.json .
COPY yarn.lock .
RUN yarn install
RUN npm install pm2 -g
#RUN yarn install
COPY . /usr/src/app/linstt-poc
RUN /usr/src/app/linstt-poc/ssl/generateDockerCert.sh
CMD ["yarn", "start"]
#CMD ["yarn", "start"]
CMD ["pm2-docker", "process.yml"]
apps:
- script : app.js
instances: 4
exec_mode: cluster
watch : true
env :
NODE_ENV: development
env_production:
NODE_ENV: production
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment