diff --git a/Dockerfile b/Dockerfile index 2cd949b..58c9a55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM node:14.16.1-alpine +FROM node:18-bookworm LABEL maintainer="madnificent@gmail.com" -RUN apk update && apk upgrade && apk add --no-cache bash git openssh +RUN apt-get update && apt-get -y upgrade && apt-get -y install git openssh-client ENV MU_SPARQL_ENDPOINT 'http://database:8890/sparql' ENV MU_APPLICATION_GRAPH 'http://mu.semte.ch/application' @@ -17,14 +17,14 @@ ENV DEBUG_AUTH_HEADERS 'true' WORKDIR /usr/src/app COPY package.json /usr/src/app/package.json COPY ./scripts /app/scripts -RUN npm config set unsafe-perm true && npm install +RUN npm install COPY . /usr/src/app RUN chmod +x /usr/src/app/run-development.sh RUN chmod +x /usr/src/app/build-production.sh EXPOSE ${PORT} -CMD sh boot.sh +CMD bash boot.sh # This stuff only runs when building an image from the template ONBUILD RUN rm -Rf /app/scripts diff --git a/babel.config.json b/babel.config.json index d2e74b7..b8eae3d 100644 --- a/babel.config.json +++ b/babel.config.json @@ -3,15 +3,14 @@ ["@babel/preset-env", { "targets": { - "node": 14 + "node": 18 } } ], ["@babel/preset-typescript"] ], "plugins": [ - ["@babel/plugin-proposal-decorators", { "legacy": true }], - ["@babel/plugin-proposal-class-properties"] + ["@babel/plugin-proposal-decorators", { "version": "2023-05" }] ], "ignore": [ "./node_modules", diff --git a/boot.sh b/boot.sh index 20961a6..c39f0b9 100755 --- a/boot.sh +++ b/boot.sh @@ -1,3 +1,4 @@ +#!/bin/bash if [ "$NODE_ENV" == "development" ] then # Run live-reload development diff --git a/build-production.sh b/build-production.sh index 4f3767c..33517d7 100755 --- a/build-production.sh +++ b/build-production.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/bash # Builds sources in production # diff --git a/package.json b/package.json index 64da3c1..78729ba 100644 --- a/package.json +++ b/package.json @@ -10,23 +10,22 @@ "mu-semtech" ], "dependencies": { - "@babel/cli": "^7.13.16", - "@babel/core": "^7.14.0", - "@babel/node": "^7.13.13", - "@babel/plugin-proposal-class-properties": "^7.13.0", - "@babel/plugin-proposal-decorators": "^7.13.15", - "@babel/preset-env": "^7.14.1", - "@babel/preset-typescript": "^7.16.7", - "babel-plugin-module-resolver": "4.1.0", - "body-parser": "~1.19.0", + "@babel/cli": "^7.20.7", + "@babel/core": "^7.20.12", + "@babel/node": "^7.20.7", + "@babel/plugin-proposal-decorators": "^7.22.15", + "@babel/preset-env": "^7.22.10", + "@babel/preset-typescript": "^7.18.6", + "babel-plugin-module-resolver": "5.0.0", + "body-parser": "~1.20.1", "coffeescript": "^2.6.1", "env-var": "^7.0.0", "express": "^4.17.1", "express-http-context": "~1.2.4", - "nodemon": "^2.0.7", + "nodemon": "^2.0.20", "sparql-client-2": "https://github.com/erikap/node-sparql-client.git", "typescript": "^4.6.2", - "uuid": "^8.3.2" + "uuid": "^9.0.0" }, "author": "Aad Versteden ", "license": "MIT", diff --git a/run-development.sh b/run-development.sh index ada805a..d3d4904 100755 --- a/run-development.sh +++ b/run-development.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/bash # We want to run from /app but don't want to touch that folder. #