Skip to content

Commit

Permalink
Update restify to support node 18 (#801)
Browse files Browse the repository at this point in the history
* Update restify to support node 18

* Update restify to v11.1.0

* Add some log messages

* Fix linting errors
  • Loading branch information
mpfeil authored Sep 7, 2023
1 parent f43f489 commit 51276d1
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 151 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Used best practices from https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker/

# --------------> The build image
FROM node:16.19.0-bullseye-slim as build
FROM node:18.17.1-bullseye-slim as build

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends git dumb-init

Expand All @@ -23,7 +23,7 @@ COPY . /usr/src/app
RUN yarn create-version-file

# --------------> The production image
FROM node:16.19.0-bullseye-slim
FROM node:18.17.1-bullseye-slim

ENV NODE_ENV=production
COPY --from=build /usr/bin/dumb-init /usr/bin/dumb-init
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"moment": "^2.29.4",
"ms": "^2.1.3",
"pino": "^8.8.0",
"restify": "9.0.0",
"restify": "11.1.0",
"restify-errors": "^8.0.2",
"simple-statistics": "^7.7.0",
"stringify-stream": "^1.0.5",
Expand Down
1 change: 0 additions & 1 deletion packages/models/src/measurement/decoding/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const transformAndValidateMeasurements = function transformAndValidateMeasuremen
// finally attach a mongodb objectId
elem._id = mongoose.Types.ObjectId();
}

// sort measurements/locations by date
arr.sort((a, b) => a.createdAt.diff(b.createdAt));

Expand Down
2 changes: 1 addition & 1 deletion tests/tests-Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.19.0-bullseye-slim
FROM node:18.17.1-bullseye-slim

# YARN_PRODUCTION=false is a workaround for https://github.com/yarnpkg/yarn/issues/4557
ENV NODE_ENV=production \
Expand Down
Loading

0 comments on commit 51276d1

Please sign in to comment.