From 4f547f73fba089db9ce163595ffbb9e9f5c150f6 Mon Sep 17 00:00:00 2001 From: Scott Dormand Date: Mon, 11 Nov 2024 12:22:29 +0000 Subject: [PATCH 1/5] Building tag error Move gulp dependency outside of dev so able to build From 380cb68ea339c48e229742e2594da2a04bfcfe76 Mon Sep 17 00:00:00 2001 From: Scott Dormand Date: Mon, 11 Nov 2024 12:24:37 +0000 Subject: [PATCH 2/5] move gulp dependencies --- packages/gafl-webapp-service/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/gafl-webapp-service/package.json b/packages/gafl-webapp-service/package.json index bc8337004..bb61bcdf8 100644 --- a/packages/gafl-webapp-service/package.json +++ b/packages/gafl-webapp-service/package.json @@ -54,6 +54,12 @@ "find": "^0.3.0", "flatpickr": "^4.6.9", "govuk-frontend": "^5.2.0", + "gulp": "^4.0.2", + "gulp-concat": "^2.6.1", + "gulp-merge": "^0.1.1", + "gulp-minify": "^3.1.0", + "gulp-sass": "^5.1.0", + "gulp-sourcemaps": "^3.0.0", "hapi-i18n": "^3.0.1", "joi": "^17.6.0", "moment": "^2.29.1", @@ -67,12 +73,6 @@ "devDependencies": { "@hapi/catbox-memory": "^5.0.1", "del": "^6.0.0", - "gulp": "^4.0.2", - "gulp-concat": "^2.6.1", - "gulp-merge": "^0.1.1", - "gulp-minify": "^3.1.0", - "gulp-sass": "^5.1.0", - "gulp-sourcemaps": "^3.0.0", "sass": "^1.69.3" }, "jest": { From abc03b178c5b08a200a1e922ccab4b238679f6bf Mon Sep 17 00:00:00 2001 From: Scott Dormand Date: Mon, 11 Nov 2024 13:03:21 +0000 Subject: [PATCH 3/5] move gulp back and edit docker file --- packages/gafl-webapp-service/Dockerfile | 8 +++++--- packages/gafl-webapp-service/package.json | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/gafl-webapp-service/Dockerfile b/packages/gafl-webapp-service/Dockerfile index 1d8143f12..7bb7bdb07 100644 --- a/packages/gafl-webapp-service/Dockerfile +++ b/packages/gafl-webapp-service/Dockerfile @@ -8,10 +8,9 @@ WORKDIR /app COPY packages/gafl-webapp-service/package*.json /app/ COPY packages/gafl-webapp-service/assets /app/assets COPY packages/gafl-webapp-service/build /app/build -RUN npm install --production \ + +RUN npm install \ && npm run prepare \ - && npm prune --production \ - && npm cache clean --force > /dev/null 2>&1 # Bundle app source COPY packages/gafl-webapp-service/ /app @@ -25,6 +24,9 @@ FROM rod_licensing/base WORKDIR /app COPY --from=builder /app/ /app/ +RUN npm prune --production \ + && npm cache clean --force > /dev/null 2>&1 + # Default service port ARG PORT=3000 diff --git a/packages/gafl-webapp-service/package.json b/packages/gafl-webapp-service/package.json index bb61bcdf8..bc8337004 100644 --- a/packages/gafl-webapp-service/package.json +++ b/packages/gafl-webapp-service/package.json @@ -54,12 +54,6 @@ "find": "^0.3.0", "flatpickr": "^4.6.9", "govuk-frontend": "^5.2.0", - "gulp": "^4.0.2", - "gulp-concat": "^2.6.1", - "gulp-merge": "^0.1.1", - "gulp-minify": "^3.1.0", - "gulp-sass": "^5.1.0", - "gulp-sourcemaps": "^3.0.0", "hapi-i18n": "^3.0.1", "joi": "^17.6.0", "moment": "^2.29.1", @@ -73,6 +67,12 @@ "devDependencies": { "@hapi/catbox-memory": "^5.0.1", "del": "^6.0.0", + "gulp": "^4.0.2", + "gulp-concat": "^2.6.1", + "gulp-merge": "^0.1.1", + "gulp-minify": "^3.1.0", + "gulp-sass": "^5.1.0", + "gulp-sourcemaps": "^3.0.0", "sass": "^1.69.3" }, "jest": { From 93ae7653c213c928c99a01879b1881c840a7b4c4 Mon Sep 17 00:00:00 2001 From: Scott Dormand Date: Mon, 11 Nov 2024 13:16:55 +0000 Subject: [PATCH 4/5] refactor install line --- packages/gafl-webapp-service/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/gafl-webapp-service/Dockerfile b/packages/gafl-webapp-service/Dockerfile index 7bb7bdb07..6cbcdf84d 100644 --- a/packages/gafl-webapp-service/Dockerfile +++ b/packages/gafl-webapp-service/Dockerfile @@ -9,8 +9,7 @@ COPY packages/gafl-webapp-service/package*.json /app/ COPY packages/gafl-webapp-service/assets /app/assets COPY packages/gafl-webapp-service/build /app/build -RUN npm install \ - && npm run prepare \ +RUN npm install && npm run prepare # Bundle app source COPY packages/gafl-webapp-service/ /app @@ -24,8 +23,7 @@ FROM rod_licensing/base WORKDIR /app COPY --from=builder /app/ /app/ -RUN npm prune --production \ - && npm cache clean --force > /dev/null 2>&1 +RUN npm prune --production && npm cache clean --force > /dev/null 2>&1 # Default service port ARG PORT=3000 From ccb75273d7180bc11ea4ab648fda011f19f2e7e8 Mon Sep 17 00:00:00 2001 From: Scott Dormand Date: Mon, 11 Nov 2024 13:37:10 +0000 Subject: [PATCH 5/5] chown in build --- packages/gafl-webapp-service/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gafl-webapp-service/Dockerfile b/packages/gafl-webapp-service/Dockerfile index 6cbcdf84d..fa494d74d 100644 --- a/packages/gafl-webapp-service/Dockerfile +++ b/packages/gafl-webapp-service/Dockerfile @@ -21,7 +21,7 @@ RUN rm -Rf /app/build /app/assets #################################################################################################################################### FROM rod_licensing/base WORKDIR /app -COPY --from=builder /app/ /app/ +COPY --from=builder --chown=node:node /app/ /app/ RUN npm prune --production && npm cache clean --force > /dev/null 2>&1