Merge branch 'master' of github.com:Ocelot-Social-Community/Ocelot-Social into 6661-fix-backup-script-for-neo4j-v4

This commit is contained in:
Wolfgang Huß 2023-09-01 12:35:09 +02:00
commit 903375ca61
20 changed files with 139 additions and 56 deletions

View File

@ -4,8 +4,21 @@ 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.2](https://github.com/Ocelot-Social-Community/Ocelot-Social/compare/3.0.0...3.0.2)
- fix(webapp): fix wrong font in whole network comming from chat component [`#6672`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6672)
- fix(webapp): fix 'm.avatar is null' error message [`#6671`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6671)
- chore(release): release v3.0.1 fix chat avatars [`#6667`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6667)
- fix(webapp): try to fix avatars [`#6660`](https://github.com/Ocelot-Social-Community/Ocelot-Social/pull/6660)
- Releasde v3.0.1 fix chat avatars [`0daeb5b`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/0daeb5b957e11d206ceddc3e8b275929e1850d18)
- Remove font 'Quicksand' from the chat [`5b95419`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5b954197dc93bd5715f657539ca1b9b32d7d557a)
- conditional url replacement [`5c1ab88`](https://github.com/Ocelot-Social-Community/Ocelot-Social/commit/5c1ab880127a5f4c1b457598fafd3ae9fe1a0d12)
### [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)

View File

@ -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.
<!-- markdownlint-disable MD033 -->
<p align="center">
<a href="https://ocelot.social" target="_blank"><img src="webapp/static/img/custom/logo-squared.svg" alt="ocelot.social" width="40%" height="40%"></a>
</p>
<!-- markdownlint-enable MD033 -->
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.

View File

@ -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)

View File

@ -5,11 +5,19 @@ 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
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_SECURE="false" # true for 465, false for other ports
SMTP_DKIM_DOMAINNAME=
SMTP_DKIM_KEYSELECTOR=
SMTP_DKIM_PRIVATKEY=
JWT_SECRET="b/&&7b78BF&fv/Vd"
JWT_EXPIRES="2y"
@ -28,7 +36,4 @@ AWS_ENDPOINT=
AWS_REGION=
AWS_BUCKET=
EMAIL_DEFAULT_SENDER="devops@ocelot.social"
EMAIL_SUPPORT="devops@ocelot.social"
CATEGORIES_ACTIVE=false

View File

@ -1,6 +1,6 @@
{
"name": "ocelot-social-backend",
"version": "3.0.0",
"version": "3.0.2",
"description": "GraphQL Backend for ocelot.social",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community",

View File

@ -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,6 +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,
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'), // replace all "\n" in .env string by real line break
}
const neo4j = {

View File

@ -5,6 +5,8 @@ import { htmlToText } from 'nodemailer-html-to-text'
const hasEmailConfig = CONFIG.SMTP_HOST && CONFIG.SMTP_PORT
const hasAuthData = CONFIG.SMTP_USERNAME && CONFIG.SMTP_PASSWORD
const hasDKIMData =
CONFIG.SMTP_DKIM_DOMAINNAME && CONFIG.SMTP_DKIM_KEYSELECTOR && CONFIG.SMTP_DKIM_PRIVATKEY
let sendMailCallback: any = async () => {}
if (!hasEmailConfig) {
@ -44,6 +46,11 @@ if (!hasEmailConfig) {
user: CONFIG.SMTP_USERNAME,
pass: CONFIG.SMTP_PASSWORD,
},
dkim: hasDKIMData && {
domainName: CONFIG.SMTP_DKIM_DOMAINNAME,
keySelector: CONFIG.SMTP_DKIM_KEYSELECTOR,
privateKey: CONFIG.SMTP_DKIM_PRIVATKEY,
},
})
transporter.use(

View File

@ -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).
<!-- markdownlint-disable MD033 -->
<p align="center">
<a href="https://ocelot.social" target="_blank"><img src="branding/static/img/custom/logo-squared.svg" alt="Ocelot-Social" width="40%" height="40%"></a>
<a href="https://ocelot.social" target="_blank"><img src="../webapp/static/img/custom/logo-squared.svg" alt="ocelot.social" width="40%" height="40%"></a>
</p>
<!-- markdownlint-enable MD033 -->
@ -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)

View File

@ -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 in environment variables (`.env` or `values.yaml`), see [here](deployment.md):
- `SMTP_DKIM_DOMAINNAME=`
- `SMTP_DKIM_KEYSELECTOR=`
- `SMTP_DKIM_PRIVATKEY=`
## Version >= 2.7.0 with 'ocelotDockerVersionTag' 2.7.0-470

View File

@ -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=<your e-mail sender domain>
SMTP_DKIM_KEYSELECTOR=2017
SMTP_DKIM_PRIVATKEY="-----BEGIN RSA PRIVATE KEY-----\n<your base64 encoded privat key data>\n-----END RSA PRIVATE KEY-----\n"
```
You can find out how DKIM works here:
<https://www.ionos.com/digitalguide/e-mail/e-mail-security/dkim-domainkeys/>
To create the private and public DKIM key, see here:
<https://knowledge.ondmarc.redsift.com/en/articles/2141592-generating-2048-bits-dkim-public-and-private-keys-using-openssl-on-a-mac>
Information about the required PEM format can be found here:
<https://docs.progress.com/bundle/datadirect-hybrid-data-pipeline-installation-46/page/PEM-file-format.html>

View File

@ -1,6 +1,6 @@
{
"name": "ocelot-social",
"version": "3.0.0",
"version": "3.0.2",
"description": "Free and open source software program code available to run social networks.",
"author": "ocelot.social Community",
"license": "MIT",
@ -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",

View File

@ -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)
@ -406,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,
@ -413,7 +415,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) {
@ -458,10 +460,7 @@ export default {
},
}
</script>
<style lang="scss">
body {
font-family: 'Quicksand', sans-serif;
}
<style lang="scss" scoped>
.vac-avatar {
background-size: cover;
background-position: center center;

View File

@ -80,10 +80,6 @@ export default {
@media only screen and (max-width: 630px) {
flex-direction: column;
> .title {
text-align: center;
}
// > .sidebar {
// max-width: none;
// }

View File

@ -2,7 +2,7 @@
<filter-menu-section
:title="$t('filter-menu.post-type')"
:divider="false"
class="following-filter post-type-filter"
class="post-type-filter"
>
<template #filter-follower>
<li class="item all-item">
@ -65,9 +65,10 @@ export default {
<style lang="scss">
.post-type-filter {
& .filter-list {
display: grid;
grid-template-columns: repeat(3, 10%);
padding-left: 0px;
display: flex;
flex-basis: 100%;
flex-grow: 1;
padding-left: $space-base;
}
}
</style>

View File

@ -1,6 +1,6 @@
{
"name": "@ocelot-social/maintenance",
"version": "3.0.0",
"version": "3.0.2",
"description": "Maintenance page for ocelot.social",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community",

View File

@ -1,6 +1,6 @@
{
"name": "ocelot-social-webapp",
"version": "3.0.0",
"version": "3.0.2",
"description": "ocelot.social Frontend",
"repository": "https://github.com/Ocelot-Social-Community/Ocelot-Social",
"author": "ocelot.social Community",

View File

@ -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,

View File

@ -98,6 +98,7 @@ export default ({ app = {} }) => {
proxyApiUrl: (input) => {
const url = input && (input.url || input)
if (!url) return url
if (url.startsWith('/api/')) return url
return url.startsWith('/') ? url.replace('/', '/api/') : url
},
})

View File

@ -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"