update result to node 10 and latest npm packages
The result app was years out of date with node and npm packages, and required multiple changes to use the current supported socket.io and postgres db libs. Minimal changes to server.js to support change in pg syntax. A few minor changes to Dockerfile to improve readability, conform to docker best practices, and change to use npm ci to ensure future builds don't break again due to difference between package and package-lock.
This commit is contained in:
@ -1,18 +1,19 @@
|
||||
FROM node:8.9-alpine
|
||||
FROM node:10-alpine
|
||||
|
||||
RUN mkdir -p /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g nodemon
|
||||
RUN npm config set registry https://registry.npmjs.org
|
||||
COPY package.json /app/package.json
|
||||
RUN npm install \
|
||||
&& npm ls \
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm ci \
|
||||
&& npm cache clean --force \
|
||||
&& mv /app/node_modules /node_modules
|
||||
COPY . /app
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV PORT 80
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
|
Reference in New Issue
Block a user