From 209390a7e026b03ee92f7b1ecb3b1a7b3b2e0232 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Jul 2023 01:50:34 +0000 Subject: [PATCH 01/20] Bump @babel/core from 7.22.8 to 7.22.9 Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.8 to 7.22.9. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.22.9/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 61 +++++++++++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/package.json b/package.json index afe65426a..beffc967a 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "release": "yarn version --no-git-tag-version --no-commit-hooks --no-commit && auto-changelog --latest-version $(node -p -e \"require('./package.json').version\") && cd backend && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../package.json').version\") && cd ../webapp/maintenance/source && yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version $(node -p -e \"require('./../../../package.json').version\")" }, "devDependencies": { - "@babel/core": "^7.22.5", + "@babel/core": "^7.22.9", "@babel/preset-env": "^7.22.4", "@babel/register": "^7.12.10", "@badeball/cypress-cucumber-preprocessor": "^15.1.4", diff --git a/yarn.lock b/yarn.lock index 492672d87..11631b2de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,31 +22,36 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.6.tgz#15606a20341de59ba02cd2fcc5086fcbe73bf544" integrity sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg== -"@babel/core@^7.16.0", "@babel/core@^7.22.5": - version "7.22.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.8.tgz#386470abe884302db9c82e8e5e87be9e46c86785" - integrity sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw== +"@babel/compat-data@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" + integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== + +"@babel/core@^7.16.0", "@babel/core@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f" + integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" - "@babel/helper-compilation-targets" "^7.22.6" - "@babel/helper-module-transforms" "^7.22.5" + "@babel/generator" "^7.22.9" + "@babel/helper-compilation-targets" "^7.22.9" + "@babel/helper-module-transforms" "^7.22.9" "@babel/helpers" "^7.22.6" "@babel/parser" "^7.22.7" "@babel/template" "^7.22.5" "@babel/traverse" "^7.22.8" "@babel/types" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" + semver "^6.3.1" -"@babel/generator@^7.22.7": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.7.tgz#a6b8152d5a621893f2c9dacf9a4e286d520633d5" - integrity sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ== +"@babel/generator@^7.22.7", "@babel/generator@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" + integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== dependencies: "@babel/types" "^7.22.5" "@jridgewell/gen-mapping" "^0.3.2" @@ -67,16 +72,16 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz#e30d61abe9480aa5a83232eb31c111be922d2e52" - integrity sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA== +"@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" + integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== dependencies: - "@babel/compat-data" "^7.22.6" + "@babel/compat-data" "^7.22.9" "@babel/helper-validator-option" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" browserslist "^4.21.9" lru-cache "^5.1.1" + semver "^6.3.1" "@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.5": version "7.22.6" @@ -147,19 +152,16 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-module-transforms@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" - integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== +"@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz#92dfcb1fbbb2bc62529024f72d942a8c97142129" + integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== dependencies: "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-module-imports" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" "@babel/helper-optimise-call-expression@^7.22.5": version "7.22.5" @@ -209,7 +211,7 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-split-export-declaration@^7.22.5", "@babel/helper-split-export-declaration@^7.22.6": +"@babel/helper-split-export-declaration@^7.22.6": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== @@ -4744,6 +4746,11 @@ semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + semver@^7.3.5, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" From 6f43321abad945602529b962e536546ab541cd70 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Mon, 7 Aug 2023 15:56:56 +0200 Subject: [PATCH 02/20] try to fix avatars --- webapp/components/Chat/Chat.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index eb0ce4433..4e973c894 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -334,6 +334,7 @@ export default { ;[...this.messages, ...Message].forEach((m) => { if (m.senderId !== this.currentUser.id) m.seen = true m.date = new Date(m.date).toDateString() + m.avatar = this.$filters.proxyApiUrl(m.avatar) msgs[m.indexId] = m }) this.messages = msgs.filter(Boolean) @@ -413,7 +414,7 @@ export default { } : null, users: room.users.map((u) => { - return { ...u, username: u.name, avatar: u.avatar?.url } + return { ...u, username: u.name, avatar: this.$filters.proxyApiUrl(u.avatar?.url) } }), } if (!fixedRoom.avatar) { From b591820eb6c1ced2556fa5998cd568d7d0ab9e59 Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 8 Aug 2023 07:56:02 +0200 Subject: [PATCH 03/20] Fix avatar in Room. --- webapp/components/Chat/Chat.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 4e973c894..7a46de387 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -407,6 +407,7 @@ export default { const fixedRoom = { ...room, index: room.lastMessage ? room.lastMessage.date : room.createdAt, + avatar: this.$filters.proxyApiUrl(room.avatar), lastMessage: room.lastMessage ? { ...room.lastMessage, From 5c1ab880127a5f4c1b457598fafd3ae9fe1a0d12 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 8 Aug 2023 22:21:24 +0200 Subject: [PATCH 04/20] conditional url replacement --- webapp/components/Chat/Chat.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 7a46de387..6535ece4e 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -334,7 +334,9 @@ export default { ;[...this.messages, ...Message].forEach((m) => { if (m.senderId !== this.currentUser.id) m.seen = true m.date = new Date(m.date).toDateString() - m.avatar = this.$filters.proxyApiUrl(m.avatar) + if(!m.avatar.startsWith('/api/')){ + m.avatar = this.$filters.proxyApiUrl(m.avatar) + } msgs[m.indexId] = m }) this.messages = msgs.filter(Boolean) From 7e697d7f9ddce184911680485ceac9d6b510349f Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 8 Aug 2023 22:22:11 +0200 Subject: [PATCH 05/20] lint fixes --- webapp/components/Chat/Chat.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 6535ece4e..0671891cb 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -334,7 +334,7 @@ export default { ;[...this.messages, ...Message].forEach((m) => { if (m.senderId !== this.currentUser.id) m.seen = true m.date = new Date(m.date).toDateString() - if(!m.avatar.startsWith('/api/')){ + if (!m.avatar.startsWith('/api/')) { m.avatar = this.$filters.proxyApiUrl(m.avatar) } msgs[m.indexId] = m From 0daeb5b957e11d206ceddc3e8b275929e1850d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 9 Aug 2023 11:52:59 +0200 Subject: [PATCH 06/20] =?UTF-8?q?Releasde=20v3.0.1=20=E2=80=93=20fix=20cha?= =?UTF-8?q?t=20avatars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 12 +++++++++++- backend/package.json | 2 +- package.json | 2 +- webapp/maintenance/source/package.json | 2 +- webapp/package.json | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d946d1d94..8950daedd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,18 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -#### [3.0.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.7.0...3.0.0) +#### [3.0.1](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.0...3.0.1) +- fix(webapp): try to fix avatars [`#6660`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6660) +- conditional url replacement [`5c1ab88`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5c1ab880127a5f4c1b457598fafd3ae9fe1a0d12) +- try to fix avatars [`6f43321`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/6f43321abad945602529b962e536546ab541cd70) +- lint fixes [`7e697d7`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/7e697d7f9ddce184911680485ceac9d6b510349f) + +### [3.0.0](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/2.7.0...3.0.0) + +> 7 August 2023 + +- chore(other): release v3.0.0 [`#6658`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6658) - fix(webapp): add missing locales [`#6652`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6652) - fix(webapp): fix wrong labels in filter menu buttons [`#6656`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6656) - refactor(webapp): refactor filter menu [`#6535`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6535) diff --git a/backend/package.json b/backend/package.json index 14c9e9a6f..9b5dde62e 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "ocelot-social-backend", - "version": "3.0.0", + "version": "3.0.1", "description": "GraphQL Backend for ocelot.social", "repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social", "author": "ocelot.social Community", diff --git a/package.json b/package.json index a656a0b4e..e16abd8f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ocelot-social", - "version": "3.0.0", + "version": "3.0.1", "description": "Free and open source software program code available to run social networks.", "author": "ocelot.social Community", "license": "MIT", diff --git a/webapp/maintenance/source/package.json b/webapp/maintenance/source/package.json index e74213608..039765a68 100644 --- a/webapp/maintenance/source/package.json +++ b/webapp/maintenance/source/package.json @@ -1,6 +1,6 @@ { "name": "@ocelot-social/maintenance", - "version": "3.0.0", + "version": "3.0.1", "description": "Maintenance page for ocelot.social", "repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social", "author": "ocelot.social Community", diff --git a/webapp/package.json b/webapp/package.json index 61090a5b3..14a962cde 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -1,6 +1,6 @@ { "name": "ocelot-social-webapp", - "version": "3.0.0", + "version": "3.0.1", "description": "ocelot.social Frontend", "repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social", "author": "ocelot.social Community", From 2c123313ed6267bb1c88470ba7ae3f4f693cfc15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 11 Aug 2023 11:14:47 +0200 Subject: [PATCH 07/20] Fix 'm.avatar is null' error message --- webapp/components/Chat/Chat.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 0671891cb..1d22a0a39 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -334,7 +334,7 @@ export default { ;[...this.messages, ...Message].forEach((m) => { if (m.senderId !== this.currentUser.id) m.seen = true m.date = new Date(m.date).toDateString() - if (!m.avatar.startsWith('/api/')) { + if (!m.avatar?.startsWith('/api/')) { m.avatar = this.$filters.proxyApiUrl(m.avatar) } msgs[m.indexId] = m From 5b954197dc93bd5715f657539ca1b9b32d7d557a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 11 Aug 2023 12:27:21 +0200 Subject: [PATCH 08/20] Remove font 'Quicksand' from the chat - Set style of chat component to 'scoped' --- webapp/components/Chat/Chat.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index 0671891cb..af9cde60d 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -462,10 +462,7 @@ export default { }, } - From be604cc94582038dbf734481ee57f381451a6134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20L=C3=B3pez?= Date: Sun, 20 Aug 2023 23:48:14 +0200 Subject: [PATCH 13/20] fix:[6687] update the groups link in map --- webapp/pages/map.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index 2bf1817f7..d83c3f581 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -270,7 +270,7 @@ export default { }, group: { linkTitle: '&' + e.features[0].properties.slug, - link: `/group/${e.features[0].properties.id}/${e.features[0].properties.slug}`, + link: `/groups/${e.features[0].properties.id}/${e.features[0].properties.slug}`, }, event: { linkTitle: e.features[0].properties.slug, From 28665bd175236d2e00299fe895cd5901bfe7e499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 21 Aug 2023 12:33:39 +0200 Subject: [PATCH 14/20] Refine DKIM config for Nodemailer --- backend/.env.template | 7 ++++--- backend/src/config/index.ts | 9 ++++++--- backend/src/middleware/helpers/email/sendMail.ts | 2 ++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/backend/.env.template b/backend/.env.template index d7a0945ec..8361b8bd2 100644 --- a/backend/.env.template +++ b/backend/.env.template @@ -5,6 +5,10 @@ NEO4J_USERNAME=neo4j NEO4J_PASSWORD=letmein GRAPHQL_URI=http://localhost:4000 CLIENT_URI=http://localhost:3000 + +# EMail +EMAIL_SUPPORT="devops@ocelot.social" +EMAIL_DEFAULT_SENDER="devops@ocelot.social" SMTP_HOST= SMTP_PORT= SMTP_IGNORE_TLS=true @@ -31,7 +35,4 @@ AWS_ENDPOINT= AWS_REGION= AWS_BUCKET= -EMAIL_DEFAULT_SENDER="devops@ocelot.social" -EMAIL_SUPPORT="devops@ocelot.social" - CATEGORIES_ACTIVE=false diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index 1544e55a6..d2d2926e9 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -40,6 +40,8 @@ const server = { JWT_EXPIRES: env.JWT_EXPIRES || '2y', } +const hasDKIMData = env.SMTP_DKIM_DOMAINNAME && env.SMTP_DKIM_KEYSELECTOR && env.SMTP_DKIM_PRIVATKEY + const smtp = { SMTP_HOST: env.SMTP_HOST, SMTP_PORT: env.SMTP_PORT, @@ -47,9 +49,10 @@ const smtp = { SMTP_SECURE: env.SMTP_SECURE === 'true', SMTP_USERNAME: env.SMTP_USERNAME, SMTP_PASSWORD: env.SMTP_PASSWORD, - SMTP_DKIM_DOMAINNAME: env.SMTP_DKIM_DOMAINNAME, - SMTP_DKIM_KEYSELECTOR: env.SMTP_DKIM_KEYSELECTOR, - SMTP_DKIM_PRIVATKEY: env.SMTP_DKIM_PRIVATKEY, + SMTP_DKIM_DOMAINNAME: hasDKIMData ? env.SMTP_DKIM_DOMAINNAME : undefined, + SMTP_DKIM_KEYSELECTOR: hasDKIMData ? env.SMTP_DKIM_KEYSELECTOR : undefined, + // PEM format: https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html + SMTP_DKIM_PRIVATKEY: hasDKIMData ? env.SMTP_DKIM_PRIVATKEY.replace(/\\n/g, '\n') : undefined, // replace all "\n" in .env string by real line break } const neo4j = { diff --git a/backend/src/middleware/helpers/email/sendMail.ts b/backend/src/middleware/helpers/email/sendMail.ts index c0e54e7f7..2e9551744 100644 --- a/backend/src/middleware/helpers/email/sendMail.ts +++ b/backend/src/middleware/helpers/email/sendMail.ts @@ -37,6 +37,8 @@ if (!hasEmailConfig) { } } else { sendMailCallback = async (templateArgs) => { + console.log('CONFIG.SMTP_DKIM_PRIVATKEY: "' + CONFIG.SMTP_DKIM_PRIVATKEY + '"') + console.log('templateArgs: ', templateArgs) const transporter = nodemailer.createTransport({ host: CONFIG.SMTP_HOST, port: CONFIG.SMTP_PORT, From f866f37bc85ce77a694e7c7f5ec85d90e632cbc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 21 Aug 2023 13:44:17 +0200 Subject: [PATCH 15/20] Add 'SMTP_SECURE' to '.env.template' of backend --- backend/.env.template | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/.env.template b/backend/.env.template index 8361b8bd2..d398c2265 100644 --- a/backend/.env.template +++ b/backend/.env.template @@ -14,6 +14,7 @@ SMTP_PORT= SMTP_IGNORE_TLS=true SMTP_USERNAME= SMTP_PASSWORD= +SMTP_SECURE="false" # true for 465, false for other ports SMTP_DKIM_DOMAINNAME= SMTP_DKIM_KEYSELECTOR= SMTP_DKIM_PRIVATKEY= From cd206c238adb7eb5db46a815c9bfcde4ea3aec46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 21 Aug 2023 13:44:29 +0200 Subject: [PATCH 16/20] Cleanup --- backend/src/middleware/helpers/email/sendMail.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/backend/src/middleware/helpers/email/sendMail.ts b/backend/src/middleware/helpers/email/sendMail.ts index 2e9551744..c0e54e7f7 100644 --- a/backend/src/middleware/helpers/email/sendMail.ts +++ b/backend/src/middleware/helpers/email/sendMail.ts @@ -37,8 +37,6 @@ if (!hasEmailConfig) { } } else { sendMailCallback = async (templateArgs) => { - console.log('CONFIG.SMTP_DKIM_PRIVATKEY: "' + CONFIG.SMTP_DKIM_PRIVATKEY + '"') - console.log('templateArgs: ', templateArgs) const transporter = nodemailer.createTransport({ host: CONFIG.SMTP_HOST, port: CONFIG.SMTP_PORT, From 9f5d32e527151854f1888614c59e0aa5f2b504d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 22 Aug 2023 14:20:10 +0200 Subject: [PATCH 17/20] Write documentation for DKIM e-mail setting --- README.md | 2 + SUMMARY.md | 2 +- deployment/README.md | 9 +++-- deployment/deployment-values.md | 38 +++++++++++++++++++ .../{README.deployment.md => deployment.md} | 0 5 files changed, 46 insertions(+), 5 deletions(-) create mode 100644 deployment/deployment-values.md rename deployment/{README.deployment.md => deployment.md} (100%) diff --git a/README.md b/README.md index 06e8d4929..2062865dd 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,11 @@ [ocelot.social](https://ocelot.social) is free and open source software program code to run social networks. Its development is supported by a community of programmers and interested network operators. +

ocelot.social

+ Our goal is to enable people to participate fairly and equally in online social networks. The equality of opportunity applies both to the fundamental equality of all people and to the possibility of letting their diverse voices be heard. diff --git a/SUMMARY.md b/SUMMARY.md index f848633d5..453a809b4 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -16,7 +16,7 @@ * [Frontend tests](webapp/testing.md) * [Backend tests](backend/testing.md) * [Docker More Closely](DOCKER_MORE_CLOSELY.md) -* [Deployment](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/blob/master/deployment/README.md) +* [Deployment](deployment/README.md) * [Contributing](CONTRIBUTING.md) * [Feature Specification](cypress/features.md) * [Code of conduct](CODE_OF_CONDUCT.md) diff --git a/deployment/README.md b/deployment/README.md index 030eb8a44..93d3fb86c 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -6,11 +6,11 @@ [![Open Source Helpers](https://www.codetriage.com/ocelot-social-community/ocelot-social-deploy-rebranding/badges/users.svg)](https://www.codetriage.com/ocelot-social-community/ocelot-social-deploy-rebranding) This repository is an in use template to rebrand, configure, and deploy [ocelot.social](https://github.com/Ocelot-Social-Community/Ocelot-Social) networks. -The forked original repository is [Ocelot-Social-Deploy-Rebranding](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding). +The forked original repository is [stage.ocelot.social](https://github.com/Ocelot-Social-Community/stage.ocelot.social).

- Ocelot-Social + ocelot.social

@@ -47,7 +47,8 @@ Since all deployment methods described here depend on [Docker](https://docker.co The next step is: -- [Configure And Branding](/branding/README.md) +- [Set Environment Variables and Configurations](./deployment-values.md) +- [Configure And Branding](./configurations/stage.ocelot.social/branding/README.md) ### Optional: Locally Testing Configuration And Branding @@ -99,7 +100,7 @@ See the login details and browser addresses above. ### Deployment -Afterwards you can [deploy](/deployment/README.md) it on your server: +Afterwards you can [deploy](/deployment/deployment.md) it on your server: - [Kubernetes with Helm](/deployment/kubernetes/README.md) diff --git a/deployment/deployment-values.md b/deployment/deployment-values.md new file mode 100644 index 000000000..300a056dd --- /dev/null +++ b/deployment/deployment-values.md @@ -0,0 +1,38 @@ +# Deployment Values + +For each deployment, you need to set the environment variables and configurations. +Here is some specific information on how to set the values. + +## E-Mails + +You need to set environment variables to send registration and invitation information or notifications to users, for example. + +### SPF and DKIM + +More and more e-mail providers require settings for authorization and verification of e-mail senders. + +### SPF + +Sometimes it is enough to create an SPF record in your DNS. + +### DKIM + +However, if you need DKIM authorization and verification, you must set the appropriate environment variables: + +```bash +SMTP_DKIM_DOMAINNAME= +SMTP_DKIM_KEYSELECTOR=2017 +SMTP_DKIM_PRIVATKEY="-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----\n" +``` + +You can find out how DKIM works here: + + + +To create the private and public DKIM key, see here: + + + +Information about the required PEM format can be found here: + + diff --git a/deployment/README.deployment.md b/deployment/deployment.md similarity index 100% rename from deployment/README.deployment.md rename to deployment/deployment.md From c6b1d663c17b8d9082e477f1de4f4b3f074dec2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 22 Aug 2023 14:55:47 +0200 Subject: [PATCH 18/20] Shorten code of DKIM config for Nodemailer to the solution used otherwise in code --- backend/src/config/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/config/index.ts b/backend/src/config/index.ts index d2d2926e9..9f03622a5 100644 --- a/backend/src/config/index.ts +++ b/backend/src/config/index.ts @@ -49,10 +49,10 @@ const smtp = { SMTP_SECURE: env.SMTP_SECURE === 'true', SMTP_USERNAME: env.SMTP_USERNAME, SMTP_PASSWORD: env.SMTP_PASSWORD, - SMTP_DKIM_DOMAINNAME: hasDKIMData ? env.SMTP_DKIM_DOMAINNAME : undefined, - SMTP_DKIM_KEYSELECTOR: hasDKIMData ? env.SMTP_DKIM_KEYSELECTOR : undefined, + SMTP_DKIM_DOMAINNAME: hasDKIMData && env.SMTP_DKIM_DOMAINNAME, + SMTP_DKIM_KEYSELECTOR: hasDKIMData && env.SMTP_DKIM_KEYSELECTOR, // PEM format: https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html - SMTP_DKIM_PRIVATKEY: hasDKIMData ? env.SMTP_DKIM_PRIVATKEY.replace(/\\n/g, '\n') : undefined, // replace all "\n" in .env string by real line break + SMTP_DKIM_PRIVATKEY: hasDKIMData && env.SMTP_DKIM_PRIVATKEY.replace(/\\n/g, '\n'), // replace all "\n" in .env string by real line break } const neo4j = { From a3a6719d0096f899e30464b4dbadc152972787bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 23 Aug 2023 14:58:40 +0200 Subject: [PATCH 19/20] Add new configuration for DKIM to 'TODO-next-update.md' --- deployment/TODO-next-update.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deployment/TODO-next-update.md b/deployment/TODO-next-update.md index 8e30d1f47..452b95164 100644 --- a/deployment/TODO-next-update.md +++ b/deployment/TODO-next-update.md @@ -1,6 +1,13 @@ # Todo For Next Update -When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings: +When you introduce a new version and branding and deploy it on your network, you need to consider the following changes and actions: + +## Version >= 3.3.0 with 'ocelotDockerVersionTag' 3.3.0-XXX + +- We have the new option to configure DKIM for sent e-mails, see [here](deployment.md): + - `SMTP_DKIM_DOMAINNAME=` + - `SMTP_DKIM_KEYSELECTOR=` + - `SMTP_DKIM_PRIVATKEY=` ## Version >= 2.7.0 with 'ocelotDockerVersionTag' 2.7.0-470 From bec27daea78816421d317136ad6c16d18e3df3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 23 Aug 2023 15:02:15 +0200 Subject: [PATCH 20/20] Refine new configuration for DKIM to 'TODO-next-update.md' --- deployment/TODO-next-update.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/TODO-next-update.md b/deployment/TODO-next-update.md index 452b95164..4470efa14 100644 --- a/deployment/TODO-next-update.md +++ b/deployment/TODO-next-update.md @@ -4,7 +4,7 @@ When you introduce a new version and branding and deploy it on your network, you ## Version >= 3.3.0 with 'ocelotDockerVersionTag' 3.3.0-XXX -- We have the new option to configure DKIM for sent e-mails, see [here](deployment.md): +- We have the new option to configure DKIM for sent e-mails in environment variables (`.env` or `values.yaml`), see [here](deployment.md): - `SMTP_DKIM_DOMAINNAME=` - `SMTP_DKIM_KEYSELECTOR=` - `SMTP_DKIM_PRIVATKEY=`