diff --git a/Dockerfile b/Dockerfile index 17f96c6..0b11dac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,11 @@ FROM eclipse-temurin:17-jdk-jammy # replace shell with bash so we can source files RUN rm /bin/sh && ln -s /bin/bash /bin/sh -ENV NODE_VERSION 16.20.0 +ENV NODE_VERSION 18.19.1 # Installing Node SHELL ["/bin/bash", "--login", "-i", "-c"] -RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash +RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash RUN source /root/.bashrc && nvm install $NODE_VERSION RUN n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; cp -r $n/{bin,lib,share} /usr/local SHELL ["/bin/bash", "--login", "-c"] @@ -28,9 +28,6 @@ RUN mv /nodejs/raccoon/models/DICOM/dcm4che/javaNode/dcm4chee/lib/linux-x86-64/* # Install raccoon dependencies ENV NPM_CONFIG_LOGLEVEL warn ENV NODE_ENV production -ENV DCMDICTPATH=/nodejs/raccoon/models/DICOM/dcmtk/dicom.dic -RUN npm install pm2@latest -g -RUN npm install -g npm@9 RUN npm install --unsafe-perm --only=production -CMD [ "pm2-runtime", "start", "ecosystem.config.js" ] \ No newline at end of file +CMD [ "node", "server.js" ] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 59dd91d..d4e4311 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -28,7 +28,7 @@ services: done; echo "db is ready!"; npm install; - pm2-runtime start ecosystem.config.js --node-args="--max-old-space-size=4096"; + node --max-old-space-size=4096 server.js; ' volumes : - ./:/nodejs/raccoon @@ -40,5 +40,5 @@ services: depends_on: - mongodb tty : true - restart: on-failure:3 + restart: unless-stopped stdin_open : true