diff --git a/backend/Dockerfile b/backend/Dockerfile index 6a02a0b9..6b04c837 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,7 +1,6 @@ # RedHat UBI 8 with an updated version of Node.js FROM registry.access.redhat.com/ubi8/ubi as builder -# Replace nodejs:14 with the version you need, for example, nodejs:16 RUN dnf module enable -y nodejs:16 && dnf install -y nodejs # Install packages, build and keep only prod packages diff --git a/backend/package-lock.json b/backend/package-lock.json index b4384d24..791d1f6b 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -20,6 +20,7 @@ "@nestjs/swagger": "^6.1.3", "@nestjs/testing": "^9.2.0", "@nestjs/typeorm": "^9.0.1", + "@types/multer": "^1.4.11", "axios": "^1.1.3", "base-64": "^1.0.0", "csvtojson": "^2.0.10", @@ -43,7 +44,6 @@ "@types/express-session": "^1.17.4", "@types/jest": "^27.0.2", "@types/joi": "^17.2.3", - "@types/multer": "^1.4.11", "@types/node": "^16.11.1", "@types/supertest": "^2.0.11", "@typescript-eslint/eslint-plugin": "^5.10.1", @@ -2237,7 +2237,6 @@ "version": "1.4.11", "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.11.tgz", "integrity": "sha512-svK240gr6LVWvv3YGyhLlA+6LRRWA4mnGIU7RcNmgjBYFl6665wcXrRfxGp5tEPVHUNm5FMcmq7too9bxCwX/w==", - "dev": true, "dependencies": { "@types/express": "*" } diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 06268eb9..0281cc35 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,7 +1,6 @@ # RedHat UBI 8 with nodejs 16 FROM registry.access.redhat.com/ubi8/ubi as builder -# Enable the Node.js 16 module and install it RUN dnf module enable -y nodejs:16 && dnf install -y nodejs # Install packages, build and keep only prod packages diff --git a/frontend/package.json b/frontend/package.json index 7a675a17..786411a9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -35,10 +35,12 @@ "sass": "^1.71.1" }, "scripts": { + "prebuild": "rimraf dist", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "start:prod": "node dist/main" }, "eslintConfig": { "extends": [