From 4a3a603d7eddd4c0d2146561073fa2db74c7e28b Mon Sep 17 00:00:00 2001 From: nick-funk Date: Wed, 6 Sep 2023 09:52:32 -0600 Subject: [PATCH 1/4] set working directory to server in docker build --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1a56483220..866b7ba3c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,6 +62,9 @@ RUN cd server && \ npm prune --production && \ cd .. +# Set working directory within server folder +WORKDIR /usr/src/app/server + # Setup the environment ENV NODE_ENV production ENV PORT 5000 From 7ae42dcc957f8aaf108a7b99a29f194b3837aeaa Mon Sep 17 00:00:00 2001 From: nick-funk Date: Wed, 6 Sep 2023 09:53:36 -0600 Subject: [PATCH 2/4] update dockerignore so it recurses into mono-repo files should stop this from generating 6+ GB docker images --- .dockerignore | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 7d259f4a06..0a64dffc37 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,15 +1,20 @@ # tests are not run in the docker container. __tests__ +**/__tests__ +**/coverage coverage # we won't use the .git folder in production. .git +.github # don't include the dependancies node_modules +**/node_modules # don't include any logs npm-debug.log* +**/npm-debug.log* # don't include any yarn files yarn-error.log @@ -17,14 +22,30 @@ yarn.lock # don't include any OS/editor files .env +**/.env .idea/ .vs +.vscode + .docz +**/.docz + *.swp +**/*.swp + *.DS_STORE +*.DS_Store +**/*.DS_STORE +**/*.DS_Store # don't include any generated files dist +**/dist + *.css.d.ts +**/*.css.d.ts + __generated__ -docs/.next \ No newline at end of file +**/__generated__ + +**/.next \ No newline at end of file From 33f8d1aa0ebee07206d85c2fbf90f0e6218a16a9 Mon Sep 17 00:00:00 2001 From: nick-funk Date: Wed, 6 Sep 2023 10:34:10 -0600 Subject: [PATCH 3/4] retarget docker CMD now that working directory is `server` --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 866b7ba3c6..68ce9fd9f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,4 +72,4 @@ EXPOSE 5000 # Run the node process directly instead of using `npm run start`: # SEE: https://github.com/nodejs/docker-node/blob/a2eb9f80b0fd224503ee2678867096c9e19a51c2/docs/BestPractices.md#cmd -CMD ["node", "server/dist/index.js"] +CMD ["node", "dist/index.js"] From 97c5485a9a9d2f4d7d4b756fb628ba8db704da56 Mon Sep 17 00:00:00 2001 From: Tessa Thornton Date: Tue, 5 Sep 2023 13:29:13 -0400 Subject: [PATCH 4/4] bump 8.5.1 --- client/package-lock.json | 4 ++-- client/package.json | 2 +- common/package-lock.json | 4 ++-- common/package.json | 4 ++-- config/package-lock.json | 4 ++-- config/package.json | 4 ++-- server/package-lock.json | 4 ++-- server/package.json | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 7e84d62ee4..29c95a9626 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "@coralproject/talk", - "version": "8.5.0", + "version": "8.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@coralproject/talk", - "version": "8.5.0", + "version": "8.5.1", "license": "Apache-2.0", "dependencies": { "@ampproject/toolbox-cache-url": "^2.9.0", diff --git a/client/package.json b/client/package.json index 8603f37f1f..ec70cda48f 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@coralproject/talk", - "version": "8.5.0", + "version": "8.5.1", "author": "The Coral Project", "homepage": "https://coralproject.net/", "sideEffects": [ diff --git a/common/package-lock.json b/common/package-lock.json index d3ba1c5703..0e94ee3ed7 100644 --- a/common/package-lock.json +++ b/common/package-lock.json @@ -1,12 +1,12 @@ { "name": "common", - "version": "8.5.0", + "version": "8.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "common", - "version": "8.5.0", + "version": "8.5.1", "license": "ISC", "dependencies": { "coral-config": "../config/dist", diff --git a/common/package.json b/common/package.json index 93d7dabfdd..67709e9a0a 100644 --- a/common/package.json +++ b/common/package.json @@ -1,6 +1,6 @@ { "name": "common", - "version": "8.5.0", + "version": "8.5.1", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -44,4 +44,4 @@ "typescript": "^3.9.5", "url-regex-safe": "^2.0.2" } -} \ No newline at end of file +} diff --git a/config/package-lock.json b/config/package-lock.json index decc9435d5..f5c43b71aa 100644 --- a/config/package-lock.json +++ b/config/package-lock.json @@ -1,12 +1,12 @@ { "name": "common", - "version": "8.5.0", + "version": "8.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "common", - "version": "8.5.0", + "version": "8.5.1", "license": "ISC", "dependencies": { "typescript": "^3.9.5" diff --git a/config/package.json b/config/package.json index e706264524..bda0dd5a2f 100644 --- a/config/package.json +++ b/config/package.json @@ -1,6 +1,6 @@ { "name": "common", - "version": "8.5.0", + "version": "8.5.1", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -14,4 +14,4 @@ "dependencies": { "typescript": "^3.9.5" } -} \ No newline at end of file +} diff --git a/server/package-lock.json b/server/package-lock.json index edf78558fa..ed165afa9f 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,12 +1,12 @@ { "name": "@coralproject/talk", - "version": "8.5.0", + "version": "8.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@coralproject/talk", - "version": "8.5.0", + "version": "8.5.1", "license": "Apache-2.0", "dependencies": { "@ampproject/toolbox-cache-url": "^2.9.0", diff --git a/server/package.json b/server/package.json index 367951ea5f..5374b676c7 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "@coralproject/talk", - "version": "8.5.0", + "version": "8.5.1", "author": "The Coral Project", "homepage": "https://coralproject.net/", "sideEffects": [ @@ -431,4 +431,4 @@ "not OperaMini all", "not dead" ] -} \ No newline at end of file +}