From 1d6c4de01ae2d3539d64f4a6b494908eaef6120a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 18 Jan 2022 12:36:43 +0100 Subject: [PATCH 01/53] Refactor to configure 'COOKIE_EXPIRE_TIME' --- deployment/kubernetes/templates/webapp/ConfigMap.yml | 1 + deployment/kubernetes/values.template.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/deployment/kubernetes/templates/webapp/ConfigMap.yml b/deployment/kubernetes/templates/webapp/ConfigMap.yml index eb378f4..685f676 100644 --- a/deployment/kubernetes/templates/webapp/ConfigMap.yml +++ b/deployment/kubernetes/templates/webapp/ConfigMap.yml @@ -14,5 +14,6 @@ data: HOST: "0.0.0.0" PUBLIC_REGISTRATION: "{{ .Values.PUBLIC_REGISTRATION }}" INVITE_REGISTRATION: "{{ .Values.INVITE_REGISTRATION }}" + COOKIE_EXPIRE_TIME: "{{ .Values.COOKIE_EXPIRE_TIME }}" WEBSOCKETS_URI: "{{ .Values.WEBAPP.WEBSOCKETS_URI }}" GRAPHQL_URI: "http://{{ .Release.Name }}-backend:4000" \ No newline at end of file diff --git a/deployment/kubernetes/values.template.yaml b/deployment/kubernetes/values.template.yaml index d5f92a8..9904344 100644 --- a/deployment/kubernetes/values.template.yaml +++ b/deployment/kubernetes/values.template.yaml @@ -3,6 +3,7 @@ # change all the below if needed PUBLIC_REGISTRATION: false INVITE_REGISTRATION: false +COOKIE_EXPIRE_TIME: 730 # days (730 days, two years by default in main code, if not set here) BACKEND: # change all the below if needed From b7908e617c6f30bc55c8420a3f5f4ef63414ae6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 18 Jan 2022 12:59:47 +0100 Subject: [PATCH 02/53] Comment the new setting out, because it's the default value --- deployment/kubernetes/values.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/kubernetes/values.template.yaml b/deployment/kubernetes/values.template.yaml index 9904344..5908e3e 100644 --- a/deployment/kubernetes/values.template.yaml +++ b/deployment/kubernetes/values.template.yaml @@ -3,7 +3,7 @@ # change all the below if needed PUBLIC_REGISTRATION: false INVITE_REGISTRATION: false -COOKIE_EXPIRE_TIME: 730 # days (730 days, two years by default in main code, if not set here) +# COOKIE_EXPIRE_TIME: 730 # days (730 days, two years by default in main code, if not set here) BACKEND: # change all the below if needed From adc9f0967e4860f48ff4c218224d4d91f19f5344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 18 Jan 2022 13:12:55 +0100 Subject: [PATCH 03/53] Revert "Comment the new setting out, because it's the default value" This reverts commit b7908e617c6f30bc55c8420a3f5f4ef63414ae6d. - I revert, because it looks like that an undefined .env variable becomes an empty string. To handle this with if statements seems to uncertain to me without intense testing! --- deployment/kubernetes/values.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/kubernetes/values.template.yaml b/deployment/kubernetes/values.template.yaml index 5908e3e..9904344 100644 --- a/deployment/kubernetes/values.template.yaml +++ b/deployment/kubernetes/values.template.yaml @@ -3,7 +3,7 @@ # change all the below if needed PUBLIC_REGISTRATION: false INVITE_REGISTRATION: false -# COOKIE_EXPIRE_TIME: 730 # days (730 days, two years by default in main code, if not set here) +COOKIE_EXPIRE_TIME: 730 # days (730 days, two years by default in main code, if not set here) BACKEND: # change all the below if needed From 96c640af0fa33df3b6c9b818ad1595823066b369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 18 Jan 2022 13:14:49 +0100 Subject: [PATCH 04/53] Adjust comment --- deployment/kubernetes/values.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/kubernetes/values.template.yaml b/deployment/kubernetes/values.template.yaml index 9904344..921ce3c 100644 --- a/deployment/kubernetes/values.template.yaml +++ b/deployment/kubernetes/values.template.yaml @@ -3,7 +3,7 @@ # change all the below if needed PUBLIC_REGISTRATION: false INVITE_REGISTRATION: false -COOKIE_EXPIRE_TIME: 730 # days (730 days, two years by default in main code, if not set here) +COOKIE_EXPIRE_TIME: 730 # days (730 days, two years is the default in main code) BACKEND: # change all the below if needed From 518ec8ffef001720fec36e827274b79d290d9055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 20 Jan 2022 18:37:01 +0100 Subject: [PATCH 05/53] Add 'TODO-next-update.md' --- TODO-next-update.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 TODO-next-update.md diff --git a/TODO-next-update.md b/TODO-next-update.md new file mode 100644 index 0000000..a2608d5 --- /dev/null +++ b/TODO-next-update.md @@ -0,0 +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 … + +## This Latest Version > 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171 + +### PR – feat: 🍰 Configure Cookie Expire Time #43 + +- You have to add the `COOKIE_EXPIRE_TIME` from the `deployment/kubernetes/values.template.yaml` to your `deployment/kubernetes/values.yaml` and set it to your prevered value. + +## Version 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171 + +- No informations. From 4fe3c5807af2b86c806fa0b6d36feac8687a5f86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 21 Jan 2022 20:05:59 +0100 Subject: [PATCH 06/53] Add todo in 'TODO-next-update.md' --- TODO-next-update.md | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO-next-update.md b/TODO-next-update.md index a2608d5..02f87e1 100644 --- a/TODO-next-update.md +++ b/TODO-next-update.md @@ -7,6 +7,7 @@ When you overtake this deploy and rebrand repo to your network you have to recog ### PR – feat: 🍰 Configure Cookie Expire Time #43 - You have to add the `COOKIE_EXPIRE_TIME` from the `deployment/kubernetes/values.template.yaml` to your `deployment/kubernetes/values.yaml` and set it to your prevered value. +- Correct cookie exploration time in data privacy. ## Version 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171 From 327668ece2d5c0925dae868bf1161db4bed918ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 21 Jan 2022 20:10:20 +0100 Subject: [PATCH 07/53] Adjust todo --- TODO-next-update.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO-next-update.md b/TODO-next-update.md index 02f87e1..b27f5f1 100644 --- a/TODO-next-update.md +++ b/TODO-next-update.md @@ -7,7 +7,7 @@ When you overtake this deploy and rebrand repo to your network you have to recog ### PR – feat: 🍰 Configure Cookie Expire Time #43 - You have to add the `COOKIE_EXPIRE_TIME` from the `deployment/kubernetes/values.template.yaml` to your `deployment/kubernetes/values.yaml` and set it to your prevered value. -- Correct cookie exploration time in data privacy. +- Correct `locale` cookie exploration time in data privacy. ## Version 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171 From a7d27f2d75c45a0b96f44d325f9ff29e4cfcabe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 30 Jun 2022 15:49:56 +0200 Subject: [PATCH 08/53] Change order of the footer links --- branding/constants/links.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/branding/constants/links.js b/branding/constants/links.js index bf1af02..0266bb5 100644 --- a/branding/constants/links.js +++ b/branding/constants/links.js @@ -128,7 +128,7 @@ export default { DATA_PRIVACY, FAQ, DONATE, - IMPRINT, SUPPORT, + IMPRINT, ], } From 5225b868d4db199f86516942e971f71cd10d0988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 30 Jun 2022 15:52:42 +0200 Subject: [PATCH 09/53] Add internal organization page instead of Ulf's company page --- branding/constants/links.js | 2 +- branding/locales/html/de/organization.html | 37 ++++++++++++++++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/branding/constants/links.js b/branding/constants/links.js index 0266bb5..f8ec3d8 100644 --- a/branding/constants/links.js +++ b/branding/constants/links.js @@ -3,7 +3,7 @@ import { defaultPageParamsPages } from '~/components/utils/InternalPages.js' const ORGANIZATION = defaultPageParamsPages.ORGANIZATION.overwrite({ - externalLink: 'https://webcraft-media.de', // if string is defined and not empty it's dominating + // externalLink: 'null', // if string is defined and not empty it's dominating internalPage: { // footerIdent: 'site.made', // localized string identifier, if undefined default is used diff --git a/branding/locales/html/de/organization.html b/branding/locales/html/de/organization.html index a5bad09..faf18e6 100644 --- a/branding/locales/html/de/organization.html +++ b/branding/locales/html/de/organization.html @@ -3,13 +3,44 @@

- Für das soziale Netzwerk wir.social + Über wir.social

- Das Entwicklernetzwerk + Schön, dass Du zu uns gefunden hast!

- Hier wird das Netzwerk beschrieben. + Unsere Vision ist, dieses bestehende autarke und auf Open-Source basierende Netzwerk gemeinsam weiter zu fördern und auszubauen. +

+

+ Dieses Netzwerk wird durch Ulf Gebhardt von Webcraft Media https://www.webcraft-media.de/#!impressum + gehostet und durch Mitglieder des gemeinnützigen Vereins busFaktor() e.V. https://www.busfaktor.org/ + gepflegt und weiterentwickelt. +

+

+ Aus der Vision von Dennis Hack, ein Abbild der Menschen zu schaffen, + die sich im Wandel zu einer förderlichen Zukunft befinden, + und das durch eine online geschaltete Human-Connection-Uhr https://human-connection.org + zu ermöglichen, entstand die Idee, das soziale + Aktions- und Wissensnetzwerk «Human Connection» ins Leben zu rufen. + Dieses war von 2018 bis 2020 online. + Nach einer Überarbeitung entstand daraus die ocelot.social Software https://ocelot.social, + auf der wir.social basiert. +

+

+ Auf Human Connection bildete sich die Gemeinschaft der «Menschheitsfamilie», + um ocelot.social zu fördern. Für ein respektvolles Miteinander hat sie in + kontinuierlicher Zusammenarbeit sie Grundprinzipien (PDF) [Link] erschaffen. +

+

+ Gerne kannst Du wir.social durch + Spenden an den busFaktor() e.V. + oder Spenden direkt an Ulf Gebhardt + mitmachend unterstützen. +

+

+ Möchtest Du diesem Netzwerk beitreten, kannst Du dies auf Einladung eines bestehenden Nutzers + tun oder bei einem der vierzehntägigen Online-Treffen mit uns in Verbindung treten. + Melde Dich dazu unter info ät menschheitsfamilie.org.

From 7107069971910e5c0d8e548f95f4cf1f91bf8a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 1 Jul 2022 09:35:42 +0200 Subject: [PATCH 10/53] Add link for Grundprinzipien --- branding/locales/html/de/organization.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/branding/locales/html/de/organization.html b/branding/locales/html/de/organization.html index faf18e6..1bc8894 100644 --- a/branding/locales/html/de/organization.html +++ b/branding/locales/html/de/organization.html @@ -28,8 +28,9 @@

Auf Human Connection bildete sich die Gemeinschaft der «Menschheitsfamilie», - um ocelot.social zu fördern. Für ein respektvolles Miteinander hat sie in - kontinuierlicher Zusammenarbeit sie Grundprinzipien (PDF) [Link] erschaffen. + um ocelot.social zu fördern. Für ein respektvolles Miteinander hat sie in + kontinuierlicher Zusammenarbeit sie Grundprinzipien (PDF) + erschaffen.

Gerne kannst Du wir.social durch From 6acb263bdacc30ee70d6c6c35bc84980dee72fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 1 Jul 2022 12:16:59 +0200 Subject: [PATCH 11/53] Release version v1.0.8, Docker version tag 1.0.8-182 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2ce4d0c..f613f4f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wir.social", - "version": "1.0.7", - "ocelotDockerVersionTag": "1.0.7-171", + "version": "1.0.8", + "ocelotDockerVersionTag": "1.0.8-182", "dockerOrganisation": "wirsocial", "description": "wir.social Network driven by ocelot.social", "author": "ocelot.social Community", From cbe5e766acb677005182c390a73911415cd93772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 1 Jul 2022 12:38:29 +0200 Subject: [PATCH 12/53] Release version v1.0.8, Docker version tag 1.0.8-182 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7d2a1dd..9963e69 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ocelot-social-branded", - "version": "1.0.7", - "ocelotDockerVersionTag": "1.0.7-171", + "version": "1.0.8", + "ocelotDockerVersionTag": "1.0.8-182", "dockerOrganisation": "ocelotsocialnetwork", "description": "ocelot.social Branded", "author": "ocelot.social Community", From d08a97606296e4d00bb147935554fd3f0d3087b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 8 Jul 2022 09:41:18 +0200 Subject: [PATCH 13/53] Change links after MF decition --- branding/locales/html/de/organization.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/branding/locales/html/de/organization.html b/branding/locales/html/de/organization.html index 1bc8894..6e59579 100644 --- a/branding/locales/html/de/organization.html +++ b/branding/locales/html/de/organization.html @@ -12,18 +12,18 @@ Unsere Vision ist, dieses bestehende autarke und auf Open-Source basierende Netzwerk gemeinsam weiter zu fördern und auszubauen.

- Dieses Netzwerk wird durch Ulf Gebhardt von Webcraft Media https://www.webcraft-media.de/#!impressum - gehostet und durch Mitglieder des gemeinnützigen Vereins busFaktor() e.V. https://www.busfaktor.org/ + Dieses Netzwerk wird durch Ulf Gebhardt von Webcraft Media + gehostet und durch Mitglieder des gemeinnützigen Vereins busFaktor() e.V. gepflegt und weiterentwickelt.

Aus der Vision von Dennis Hack, ein Abbild der Menschen zu schaffen, die sich im Wandel zu einer förderlichen Zukunft befinden, - und das durch eine online geschaltete Human-Connection-Uhr https://human-connection.org + und das durch eine online geschaltete Human-Connection-Uhr zu ermöglichen, entstand die Idee, das soziale Aktions- und Wissensnetzwerk «Human Connection» ins Leben zu rufen. Dieses war von 2018 bis 2020 online. - Nach einer Überarbeitung entstand daraus die ocelot.social Software https://ocelot.social, + Nach einer Überarbeitung entstand daraus die ocelot.social Software, auf der wir.social basiert.

@@ -89,4 +89,9 @@ border: 1px solid #e0dede; padding: 10px; } + + /* individual on this page */ + .info-page a { + white-space: nowrap; + } From 1a4d33ed60f4e876a918c082a1b2bef21f5ab590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 8 Jul 2022 09:45:41 +0200 Subject: [PATCH 14/53] Correct spelling --- branding/locales/html/de/organization.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/branding/locales/html/de/organization.html b/branding/locales/html/de/organization.html index 6e59579..d1cfeb2 100644 --- a/branding/locales/html/de/organization.html +++ b/branding/locales/html/de/organization.html @@ -29,7 +29,7 @@

Auf Human Connection bildete sich die Gemeinschaft der «Menschheitsfamilie», um ocelot.social zu fördern. Für ein respektvolles Miteinander hat sie in - kontinuierlicher Zusammenarbeit sie Grundprinzipien (PDF) + kontinuierlicher Zusammenarbeit die Grundprinzipien (PDF) erschaffen.

From 45913de805b9747cf0f468ab533208db4f189bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 8 Jul 2022 11:14:18 +0200 Subject: [PATCH 15/53] Refine docs, first step --- README.md | 31 ++++++++++++++++++++++----- deployment/kubernetes/DigitalOcean.md | 3 ++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a74a590..a57f184 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,20 @@ 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). +

Ocelot-Social

+ - Logins: @@ -24,7 +30,8 @@ Logins: | `user@example.org` | 1234 | user | | `moderator@example.org` | 1234 | moderator | | `admin@example.org` | 1234 | admin | ---> + +Deployed networks can be found [here](#list-of-deployed-networks). ## Usage @@ -44,7 +51,7 @@ The next step is: - [Configure And Branding](/branding/README.md) -### Optional: Proof Configuration And Branding Locally +### Optional: Locally Testing Configuration And Branding Just in case you have Docker installed and run the following, you can check your branding locally: @@ -74,7 +81,7 @@ Secondly, in your GitHub repository, click on the 'Settings' tab and go to the ' 1. Named `DOCKERHUB_TOKEN` with the newly created DockerHub token (only the code, not the token name). 2. Named `DOCKERHUB_USERNAME` with your DockerHub username. -### Optional: Proof DockerHub Images Locally +### Optional: Locally Testing Your DockerHub Images Just in case you like to check your pushed Docker images in your organisation's DockerHub repositories locally: @@ -123,6 +130,20 @@ Browser compatibility testing with [BrowserStack](https://www.browserstack.com/) BrowserStack Logo --> +## List Of Deployed Networks + +You may need an invitation to access a network. + +### More Likely To Try + +- [wir.social](https://wir.social) + +### Others + +- [freilernen.social](https://freilernen.social) +- [helfa.social](https://helfa.social) +- [sender.fm](https://sender.fm) + ## License See the [LICENSE](/LICENSE.md) file for license rights and limitations (MIT). diff --git a/deployment/kubernetes/DigitalOcean.md b/deployment/kubernetes/DigitalOcean.md index 50b7034..b935ff7 100644 --- a/deployment/kubernetes/DigitalOcean.md +++ b/deployment/kubernetes/DigitalOcean.md @@ -18,7 +18,8 @@ On the right top you find the button `Create`. Click on it and choose `Kubernete - use the latest Kubernetes version - choose your datacenter region - name your node pool: e.g. `pool-` -- 2 `Basic node` with a total of 4GB and 2 shared CPUs are enough to start with +- `2 Basic nodes` with a total of `4 GB` and `2 shared CPUs` are enough to start with +- `2 Basic nodes` with a total of `8 GB` and `2 shared CPUs` are a bit more optimal for the beginning - no tags necessary - set your cluster name: e.g. `cluster-` - select your project From 2dd33909c7a7829828d1ff994a7f5f67061d3ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Sat, 9 Jul 2022 21:20:16 +0200 Subject: [PATCH 16/53] Update cert-manager apiVersion "cert-manager.io/v1alpha2" to "cert-manager.io/v1" --- .../kubernetes/templates/issuer/letsencrypt-production.yaml | 2 +- deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml b/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml index 2836cce..6f82f36 100644 --- a/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml +++ b/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml @@ -1,4 +1,4 @@ -apiVersion: cert-manager.io/v1alpha2 +apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-production diff --git a/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml b/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml index 7190e65..e488d93 100644 --- a/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml +++ b/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml @@ -1,4 +1,4 @@ -apiVersion: cert-manager.io/v1alpha2 +apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-staging From 70a60122b4c456e0a087a0a82ba66a2ec30f875f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Sat, 9 Jul 2022 21:21:33 +0200 Subject: [PATCH 17/53] Update deploy instructions --- LICENSE.md | 2 +- deployment/kubernetes/DigitalOcean.md | 11 +++++----- deployment/kubernetes/LICENSE | 12 ----------- deployment/kubernetes/README.md | 31 ++++++++++++++++++++++----- 4 files changed, 32 insertions(+), 24 deletions(-) delete mode 100644 deployment/kubernetes/LICENSE diff --git a/LICENSE.md b/LICENSE.md index d2be003..69cc340 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -2,7 +2,7 @@ MIT License -Copyright \(c\) 2021 by the [Ocelot.Social Community](https://github.com/Ocelot-Social-Community) +Copyright \(c\) 2022 by the [Ocelot.Social Community](https://github.com/Ocelot-Social-Community) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the "Software"\), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deployment/kubernetes/DigitalOcean.md b/deployment/kubernetes/DigitalOcean.md index b935ff7..2c919d5 100644 --- a/deployment/kubernetes/DigitalOcean.md +++ b/deployment/kubernetes/DigitalOcean.md @@ -18,18 +18,17 @@ On the right top you find the button `Create`. Click on it and choose `Kubernete - use the latest Kubernetes version - choose your datacenter region - name your node pool: e.g. `pool-` -- `2 Basic nodes` with a total of `4 GB` and `2 shared CPUs` are enough to start with -- `2 Basic nodes` with a total of `8 GB` and `2 shared CPUs` are a bit more optimal for the beginning -- no tags necessary +- `2 Basic nodes` with `2.5 GB RAM (total of 4 GB)`, `2 shared CPUs`, and `80 GB Disk` each is optimal for the beginning - set your cluster name: e.g. `cluster-` - select your project +- no tags necessary ## Getting Started -After your cluster is set up, see progress bar above, click on `Getting started`. Please install the following management tools: +After your cluster is set up – see progress bar above – click on `Getting started`. Please install the following management tools: -- [kubectl](https://kubernetes.io/docs/tasks/tools/) -- [doctl](https://github.com/digitalocean/doctl) +- [kubectl v1.24.1](https://kubernetes.io/docs/tasks/tools/) +- [doctl v1.78.0](https://github.com/digitalocean/doctl) Install the tools as described on the tab or see the links here. diff --git a/deployment/kubernetes/LICENSE b/deployment/kubernetes/LICENSE deleted file mode 100644 index a027039..0000000 --- a/deployment/kubernetes/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -# LICENSE - -MIT License - -Copyright \(c\) 2021 Ulf Gebhardt - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files \(the "Software"\), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/deployment/kubernetes/README.md b/deployment/kubernetes/README.md index c519cb0..8388f50 100644 --- a/deployment/kubernetes/README.md +++ b/deployment/kubernetes/README.md @@ -19,15 +19,36 @@ Besides the `values.template.yaml` file we provide a `nginx.values.template.yaml ## Installation -Due to the many limitations of Helm you still have to do several manual steps. Those occur before you run the actual *ocelot.social* Helm chart. Obviously it is expected of you to have `helm` and `kubectl` installed. For DigitalOcean you might require `doctl` aswell. +Due to the many limitations of Helm you still have to do several manual steps. +Those occur before you run the actual *ocelot.social* Helm chart. +Obviously it is expected of you to have `helm` and `kubectl` installed. +For the cert-manager you may need `cmctl`, see below. +For DigitalOcean you may also need `doctl`. + +Install: + +- [kubectl v1.24.1](https://kubernetes.io/docs/tasks/tools/) +- [doctl v1.78.0](https://docs.digitalocean.com/reference/doctl/how-to/install/) +- [cmctl v1.8.2](https://cert-manager.io/docs/usage/cmctl/#installation) +- [helm v3.9.0](https://helm.sh/docs/intro/install/) + ### Cert Manager (https) -Please refer to [cert-manager.io docs](https://cert-manager.io/docs/installation/kubernetes/) for more details. +Please refer to [cert-manager.io docs](https://cert-manager.io/docs/installation/) for more details. ***ATTENTION:*** *Be with the Terminal in your repository in the folder of this README.* -#### 1. Create Namespace +We have three ways to install the cert-manager, purely via `kubectl`, via `cmctl`, or with `helm`. + +We recommend using `helm` because then we do not mix the installation methods. +Please have a look here: + +- [Installing with Helm](https://cert-manager.io/docs/installation/helm/#installing-with-helm) + +***ATTENTION:*** *When uninstalling cert-manager, be sure to use the same method as for installation! Otherwise, we could end up in a broken state, see [Uninstall](https://cert-manager.io/docs/installation/kubectl/#uninstalling).* + + ### Ingress-Nginx @@ -108,7 +129,7 @@ You will need an API token, which you can generate in the control panel at Date: Sat, 9 Jul 2022 21:33:39 +0200 Subject: [PATCH 18/53] Update TODO-next-update.md --- TODO-next-update.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/TODO-next-update.md b/TODO-next-update.md index b27f5f1..4585364 100644 --- a/TODO-next-update.md +++ b/TODO-next-update.md @@ -2,7 +2,14 @@ When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings … -## This Latest Version > 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171 +## Version > 1.0.8 with 'ocelotDockerVersionTag' 1.0.8-182 + +### Deployment/Rebranding PR – chore: [WIP] 🍰 Refine docs, first step #46 + +- Commit: `Update cert-manager apiVersion "cert-manager.io/v1alpha2" to "cert-manager.io/v1" + - Check for `kubectl` and `helm` versions. + +## Version 1.0.8 with 'ocelotDockerVersionTag' 1.0.8-182 ### PR – feat: 🍰 Configure Cookie Expire Time #43 From 11742743760737d9b7c138e3d5cb9ec4a8a5739b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 18 Jul 2022 07:24:58 +0200 Subject: [PATCH 19/53] Add Docker documentation --- docker/DOCKER_MORE_CLOSELY.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docker/DOCKER_MORE_CLOSELY.md diff --git a/docker/DOCKER_MORE_CLOSELY.md b/docker/DOCKER_MORE_CLOSELY.md new file mode 100644 index 0000000..c5c9269 --- /dev/null +++ b/docker/DOCKER_MORE_CLOSELY.md @@ -0,0 +1,16 @@ +# Docker + +## Apple M1 Platform + +***Attention:** For using Docker commands in Apple M1 environments!* + +```bash +# set env variable for your shell +$ export DOCKER_DEFAULT_PLATFORM=linux/amd64 +``` + +For even more informations, see [Docker More Closely](#docker-more-closely) + +## Docker More Closely + +To get more informations about the Apple M1 platform and to analyze the Docker builds etc. you find our documentation in our main code, [here](https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/DOCKER_MORE_CLOSELY.md). From d6480c14e5ac47577d4cd24bbd036063d06544f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 18 Jul 2022 07:56:06 +0200 Subject: [PATCH 20/53] Rename Neo4j Docker image in general to 'neo4j-community:*' --- docker-compose.ocelotsocial-branded.yml | 27 ++++++++++------ docker-compose.yml | 41 ++++++++++++++++--------- docker/neo4j.Dockerfile | 3 +- 3 files changed, 47 insertions(+), 24 deletions(-) diff --git a/docker-compose.ocelotsocial-branded.yml b/docker-compose.ocelotsocial-branded.yml index 6d4c148..7591b4a 100644 --- a/docker-compose.ocelotsocial-branded.yml +++ b/docker-compose.ocelotsocial-branded.yml @@ -2,10 +2,12 @@ version: "3.4" services: + ######################################################## # WEBAPP ############################################### ######################################################## webapp: + # name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile' image: ocelotsocialnetwork/webapp-branded:latest ports: - 3000:3000 @@ -19,10 +21,12 @@ services: - MAPBOX_TOKEN="pk.eyJ1IjoiYnVzZmFrdG9yIiwiYSI6ImNraDNiM3JxcDBhaWQydG1uczhpZWtpOW4ifQ.7TNRTO-o9aK1Y6MyW_Nd4g" # - WEBSOCKETS_URI=ws://backend:4000/graphql # is not working and not given in Docker YAML in main repo - PUBLIC_REGISTRATION=true + ######################################################## # BACKEND ############################################## ######################################################## backend: + # name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile' image: ocelotsocialnetwork/backend-branded:latest networks: - test-network @@ -47,10 +51,23 @@ services: - SMTP_HOST=mailserver - SMTP_PORT=25 - SMTP_IGNORE_TLS=true + + ######################################################## + # MAINTENANCE ########################################## + ######################################################## + maintenance: + # name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile' + image: ocelotsocialnetwork/maintenance-branded:latest + networks: + - test-network + ports: + - 3001:80 + ######################################################## # NEO4J ################################################ ######################################################## neo4j: + # name the image to match our image to be tested from our DockerHub repository so that it can be pulled from there, otherwise it will be created locally from the 'dockerfile' image: ocelotsocialnetwork/neo4j-community-branded:latest networks: - test-network @@ -62,15 +79,7 @@ services: - 7687:7687 volumes: - neo4j_data:/data - ######################################################## - # MAINTENANCE ########################################## - ######################################################## - maintenance: - image: ocelotsocialnetwork/maintenance-branded:latest - networks: - - test-network - ports: - - 5000:80 + ######################################################## # MAILSERVER TO FAKE SMTP ############################## ######################################################## diff --git a/docker-compose.yml b/docker-compose.yml index 41d515d..5610511 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,15 @@ # This docker-compose file is just here for testing + version: "3.4" services: + ######################################################## # WEBAPP ############################################### ######################################################## webapp: + # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there + image: ocelotsocialnetwork/webapp-branded:local-production build: dockerfile: docker/webapp.Dockerfile target: branded @@ -22,10 +26,13 @@ services: - MAPBOX_TOKEN="pk.eyJ1IjoiYnVzZmFrdG9yIiwiYSI6ImNraDNiM3JxcDBhaWQydG1uczhpZWtpOW4ifQ.7TNRTO-o9aK1Y6MyW_Nd4g" # - WEBSOCKETS_URI=ws://backend:4000/graphql # is not working and not given in Docker YAML in main repo - PUBLIC_REGISTRATION=true + ######################################################## # BACKEND ############################################## ######################################################## backend: + # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there + image: ocelotsocialnetwork/backend-branded:local-production build: dockerfile: docker/backend.Dockerfile target: branded @@ -53,11 +60,29 @@ services: - SMTP_HOST=mailserver - SMTP_PORT=25 - SMTP_IGNORE_TLS=true + + ######################################################## + # MAINTENANCE ########################################## + ######################################################## + maintenance: + # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there + image: ocelotsocialnetwork/maintenance-branded:local-production + build: + # TODO: Separate from webapp, this must be independent + dockerfile: docker/maintenance.Dockerfile + target: branded + context: . + networks: + - test-network + ports: + - 3001:80 + ######################################################## # NEO4J ################################################ ######################################################## neo4j: - image: ocelotsocialnetwork/neo4j:community + # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there + image: ocelotsocialnetwork/neo4j-community-branded:local-production networks: - test-network volumes: @@ -68,19 +93,7 @@ services: - NEO4J_ACCEPT_LICENSE_AGREEMENT=yes ports: - 7687:7687 - ######################################################## - # MAINTENANCE ########################################## - ######################################################## - maintenance: - build: - # TODO: Separate from webapp, this must be independent - dockerfile: docker/maintenance.Dockerfile - target: branded - context: . - networks: - - test-network - ports: - - 5000:80 + ######################################################## # MAILSERVER TO FAKE SMTP ############################## ######################################################## diff --git a/docker/neo4j.Dockerfile b/docker/neo4j.Dockerfile index 980c45e..eddc7be 100644 --- a/docker/neo4j.Dockerfile +++ b/docker/neo4j.Dockerfile @@ -1,4 +1,4 @@ -ARG APP_IMAGE=ocelotsocialnetwork/neo4j +ARG APP_IMAGE=ocelotsocialnetwork/neo4j-community ARG APP_IMAGE_TAG=latest ARG APP_IMAGE_COMMUNITY=${APP_IMAGE}:${APP_IMAGE_TAG} @@ -10,4 +10,5 @@ FROM $APP_IMAGE_COMMUNITY as community-branded ################################################################################## # ENTERPRISE ##################################################################### ################################################################################## +# Todo: refactor this with 'APP_IMAGE', 'APP_IMAGE_TAG', and similar to 'APP_IMAGE_COMMUNITY', Neo4j 'dockerfile' from main code FROM ocelotsocialnetwork/neo4j-enterprise:latest as enterprise-branded From d66e8f0f1752b55879a452ee0091ba77087c0db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 18 Jul 2022 10:55:10 +0200 Subject: [PATCH 21/53] Adjust maintenance container name in deployment with Helm --- deployment/kubernetes/templates/maintenance/Deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/kubernetes/templates/maintenance/Deployment.yaml b/deployment/kubernetes/templates/maintenance/Deployment.yaml index 5a2eb39..fd1aa31 100644 --- a/deployment/kubernetes/templates/maintenance/Deployment.yaml +++ b/deployment/kubernetes/templates/maintenance/Deployment.yaml @@ -26,7 +26,7 @@ spec: rollme: {{ randAlphaNum 5 | quote }} spec: containers: - - name: maintenance + - name: container-{{ .Release.Name }}-maintenance image: "{{ .Values.MAINTENANCE.DOCKER_IMAGE_REPO }}:{{ .Chart.AppVersion }}" imagePullPolicy: {{ .Values.MAINTENANCE.DOCKER_IMAGE_PULL_POLICY }} envFrom: From 86a613cbe025f94fb6a02185c8da246716fd44db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 18 Jul 2022 13:39:40 +0200 Subject: [PATCH 22/53] Release new build version v1.0.8-184 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9963e69..57fcb26 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ocelot-social-branded", "version": "1.0.8", - "ocelotDockerVersionTag": "1.0.8-182", + "ocelotDockerVersionTag": "1.0.8-184", "dockerOrganisation": "ocelotsocialnetwork", "description": "ocelot.social Branded", "author": "ocelot.social Community", From a9d43d88e5c24d10cd3737eb4b7ee7781703fcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 18 Jul 2022 18:38:30 +0200 Subject: [PATCH 23/53] Fix 'apiVersion: cert-manager.io/v1alpha2' to '*/v1' --- .../kubernetes/templates/issuer/letsencrypt-production.yaml | 2 +- deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml b/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml index 2836cce..6f82f36 100644 --- a/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml +++ b/deployment/kubernetes/templates/issuer/letsencrypt-production.yaml @@ -1,4 +1,4 @@ -apiVersion: cert-manager.io/v1alpha2 +apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-production diff --git a/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml b/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml index 7190e65..e488d93 100644 --- a/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml +++ b/deployment/kubernetes/templates/issuer/letsencrypt-staging.yaml @@ -1,4 +1,4 @@ -apiVersion: cert-manager.io/v1alpha2 +apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: letsencrypt-staging From f09a32d0d19f984a186cf343c54560b3d6e07e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 08:28:13 +0200 Subject: [PATCH 24/53] Implement 'PRODUCTION_DB_CLEAN_ALLOW' for production environments on staging servers --- deployment/kubernetes/templates/backend/ConfigMap.yml | 1 + deployment/kubernetes/values.template.yaml | 1 + docker-compose.ocelotsocial-branded.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/deployment/kubernetes/templates/backend/ConfigMap.yml b/deployment/kubernetes/templates/backend/ConfigMap.yml index 4ea065c..a4c8405 100644 --- a/deployment/kubernetes/templates/backend/ConfigMap.yml +++ b/deployment/kubernetes/templates/backend/ConfigMap.yml @@ -11,6 +11,7 @@ metadata: app.kubernetes.io/managed-by: "{{ .Release.Service }}" helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" data: + PRODUCTION_DB_CLEAN_ALLOW: "{{ .Values.PRODUCTION_DB_CLEAN_ALLOW }}" PUBLIC_REGISTRATION: "{{ .Values.PUBLIC_REGISTRATION }}" INVITE_REGISTRATION: "{{ .Values.INVITE_REGISTRATION }}" CLIENT_URI: "{{ .Values.BACKEND.CLIENT_URI }}" diff --git a/deployment/kubernetes/values.template.yaml b/deployment/kubernetes/values.template.yaml index 921ce3c..9b5b751 100644 --- a/deployment/kubernetes/values.template.yaml +++ b/deployment/kubernetes/values.template.yaml @@ -1,6 +1,7 @@ # please duplicate template file and rename to "values.yaml" and fill in your value # change all the below if needed +PRODUCTION_DB_CLEAN_ALLOW: false # only true for production environments on staging servers PUBLIC_REGISTRATION: false INVITE_REGISTRATION: false COOKIE_EXPIRE_TIME: 730 # days (730 days, two years is the default in main code) diff --git a/docker-compose.ocelotsocial-branded.yml b/docker-compose.ocelotsocial-branded.yml index 7591b4a..9d678ec 100644 --- a/docker-compose.ocelotsocial-branded.yml +++ b/docker-compose.ocelotsocial-branded.yml @@ -45,6 +45,7 @@ services: - PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78 - EMAIL_SUPPORT=support@wir.social - EMAIL_DEFAULT_SENDER=info@wir.social + - PRODUCTION_DB_CLEAN_ALLOW=true # because this is stage.ocelot.social # false # only true for production environments on staging servers - PUBLIC_REGISTRATION=true - SMTP_USERNAME=${SMTP_USERNAME} - SMTP_PASSWORD=${SMTP_PASSWORD} From 0317d44adee9db47eb59aca3e49c124003dca107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 09:37:16 +0200 Subject: [PATCH 25/53] Set push branch temporary to this branch as well --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0fde053..c89ab3f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: branches: - master - # - 14-new-deployment-with-base-and-code # for testing while developing + - 5065-automatic-deployment-to-stage.ocelot.social-on-push-to-master-branch # for testing while developing jobs: ############################################################################## From efc78594de545471b9498b1203681aa0b95d1a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 09:38:50 +0200 Subject: [PATCH 26/53] Add Documentation for 'Kubernetes Commands (Without Helm) To Deploy New Docker Images To A Kubernetes Cluster' --- deployment/kubernetes/README.md | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/deployment/kubernetes/README.md b/deployment/kubernetes/README.md index c519cb0..e14ab40 100644 --- a/deployment/kubernetes/README.md +++ b/deployment/kubernetes/README.md @@ -225,3 +225,50 @@ support, try this [helm chart](https://github.com/helm/charts/tree/master/stable On our kubernetes cluster we get "mult-attach" errors for persistent volumes. Apparently DigitalOcean's kubernetes clusters do not fulfill the requirements. + +## Kubernetes Commands (Without Helm) To Deploy New Docker Images To A Kubernetes Cluster + +### Deploy A Version + +```bash +# !!! be aware of the correct kube context !!! +$ kubectl config get-contexts + +# deploy version '$BUILD_VERSION' +# !!! 'latest' is not recommended on production !!! + +# for easyness set env +$ export BUILD_VERSION=1.0.8-48-ocelot.social1.0.8-184 # example +# check this with +$ echo $BUILD_VERSION +1.0.8-48-ocelot.social1.0.8-184 + +# deploy actual version '$BUILD_VERSION' to Kubernetes cluster +$ kubectl -n default set image deployment/ocelot-webapp container-ocelot-webapp=ocelotsocialnetwork/webapp:$BUILD_VERSION +$ kubectl -n default rollout restart deployment/ocelot-webapp +$ kubectl -n default set image deployment/ocelot-backend container-ocelot-backend=ocelotsocialnetwork/backend:$BUILD_VERSION +$ kubectl -n default rollout restart deployment/ocelot-backend +$ kubectl -n default set image deployment/ocelot-maintenance container-ocelot-maintenance=ocelotsocialnetwork/maintenance:$BUILD_VERSION +$ kubectl -n default rollout restart deployment/ocelot-maintenance +$ kubectl -n default set image deployment/ocelot-neo4j container-ocelot-neo4j=ocelotsocialnetwork/neo4j-community:$BUILD_VERSION +$ kubectl -n default rollout restart deployment/ocelot-neo4j +# verify deployment and wait for the pods of each deployment to get ready for cleaning and seeding of the database +$ kubectl -n default rollout status deployment/ocelot-webapp --timeout=240s +$ kubectl -n default rollout status deployment/ocelot-maintenance --timeout=240s +$ kubectl -n default rollout status deployment/ocelot-backend --timeout=240s +$ kubectl -n default rollout status deployment/ocelot-neo4j --timeout=240s +``` + +### Staging – Clean And Seed Neo4j Database + +***ATTENTION:*** Cleaning and seeding of our Neo4j database is only possible in production if env `PRODUCTION_DB_CLEAN_ALLOW=true` is set in our deployment. + +```bash +# !!! be aware of the correct kube context !!! +$ kubectl config get-contexts + +# reset and seed Neo4j database via backend for staging +$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node dist/db/clean.js" +$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node dist/db/seed.js" + +``` From eafc73dc0f449827598a538dc85518acdf5e7226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 09:51:30 +0200 Subject: [PATCH 27/53] Comment out 'PRODUCTION_DB_CLEAN_ALLOW' in 'docker-compose.ocelotsocial-branded.yml' --- docker-compose.ocelotsocial-branded.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.ocelotsocial-branded.yml b/docker-compose.ocelotsocial-branded.yml index 9d678ec..b8c3ce4 100644 --- a/docker-compose.ocelotsocial-branded.yml +++ b/docker-compose.ocelotsocial-branded.yml @@ -45,7 +45,7 @@ services: - PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78 - EMAIL_SUPPORT=support@wir.social - EMAIL_DEFAULT_SENDER=info@wir.social - - PRODUCTION_DB_CLEAN_ALLOW=true # because this is stage.ocelot.social # false # only true for production environments on staging servers + # - PRODUCTION_DB_CLEAN_ALLOW=false # only true for production environments on staging servers - PUBLIC_REGISTRATION=true - SMTP_USERNAME=${SMTP_USERNAME} - SMTP_PASSWORD=${SMTP_PASSWORD} From ac19f5959c6ad7c3a322e4ebf27c02aa7b57de0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 09:52:56 +0200 Subject: [PATCH 28/53] Comment out 'PRODUCTION_DB_CLEAN_ALLOW' in 'docker-compose.yml' --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5610511..285a0d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,7 @@ services: - PRIVATE_KEY_PASSPHRASE=a7dsf78sadg87ad87sfagsadg78 - EMAIL_SUPPORT=support@wir.social - EMAIL_DEFAULT_SENDER=info@wir.social + # - PRODUCTION_DB_CLEAN_ALLOW=false # only true for production environments on staging servers - PUBLIC_REGISTRATION=true - SMTP_USERNAME=${SMTP_USERNAME} - SMTP_PASSWORD=${SMTP_PASSWORD} From 126c92480b8b55e742799838bac83a7a5013d2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 10:00:55 +0200 Subject: [PATCH 29/53] Fix changing of push branch temporary to this branch as well --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c89ab3f..ce08ee1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - 5065-automatic-deployment-to-stage.ocelot.social-on-push-to-master-branch # for testing while developing + - 55-implement-PRODUCTION_DB_CLEAN_ALLOW-for-staging-production-evironments # for testing while developing jobs: ############################################################################## From a44f00310490aa20c128e15ea7c9185e43898e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 10:11:35 +0200 Subject: [PATCH 30/53] Add Docker Compose override for Apple M1 --- docker-compose.apple-m1.override.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docker-compose.apple-m1.override.yml diff --git a/docker-compose.apple-m1.override.yml b/docker-compose.apple-m1.override.yml new file mode 100644 index 0000000..80344e4 --- /dev/null +++ b/docker-compose.apple-m1.override.yml @@ -0,0 +1,36 @@ +# This docker-compose file is just here for testing + +version: "3.4" + +services: + + ######################################################## + # WEBAPP ############################################### + ######################################################## + webapp: + platform: linux/amd64 + + ######################################################## + # BACKEND ############################################## + ######################################################## + backend: + platform: linux/amd64 + + ######################################################## + # MAINTENANCE ########################################## + ######################################################## + maintenance: + platform: linux/amd64 + + ######################################################## + # NEO4J ################################################ + ######################################################## + neo4j: + platform: linux/amd64 + + ######################################################## + # MAILSERVER TO FAKE SMTP ############################## + ######################################################## + # commented out, because otherwise override of production would error. and it seems unnecessary + # mailserver: + # platform: linux/amd64 From b36eb508a64363ef7b3a60ad2bd040765cabd7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 10:45:38 +0200 Subject: [PATCH 31/53] Document Docker Compose override for Apple M1 --- docker/DOCKER_MORE_CLOSELY.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docker/DOCKER_MORE_CLOSELY.md diff --git a/docker/DOCKER_MORE_CLOSELY.md b/docker/DOCKER_MORE_CLOSELY.md new file mode 100644 index 0000000..113e3a4 --- /dev/null +++ b/docker/DOCKER_MORE_CLOSELY.md @@ -0,0 +1,33 @@ +# Docker + +## Apple M1 Platform + +***Attention:** For using Docker commands in Apple M1 environments!* + +```bash +# set env variable for your shell +$ export DOCKER_DEFAULT_PLATFORM=linux/amd64 +``` + +For even more informations, see [Docker More Closely](#docker-more-closely) + +### Docker Compose Override File For Apple M1 Platform + +For Docker compose `up` or `build` commands, you can use our Apple M1 override file that specifies the M1 platform: + +```bash +# in main folder + +# for production +$ docker compose -f docker-compose.yml -f docker-compose.apple-m1.override.yml up + +# for production testing Docker images from DockerHub +$ docker compose -f docker-compose.ocelotsocial-branded.yml -f docker-compose.apple-m1.override.yml up + +# only once: init admin user and create indexes and contraints in Neo4j database +$ docker compose exec backend /bin/sh -c "yarn prod:migrate init" +``` + +## Docker More Closely In Main Code + +To get more informations about the Apple M1 platform and to analyze the Docker builds etc. you find our documentation in our main code, [here](https://github.com/Ocelot-Social-Community/Ocelot-Social/blob/master/DOCKER_MORE_CLOSELY.md). From 0adbe7696b8540814367f614ad230995150a7377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 14:50:07 +0200 Subject: [PATCH 32/53] Change back to only publish on master branch push --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ce08ee1..2743a25 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - 55-implement-PRODUCTION_DB_CLEAN_ALLOW-for-staging-production-evironments # for testing while developing + # - 55-implement-PRODUCTION_DB_CLEAN_ALLOW-for-staging-production-evironments # for testing while developing jobs: ############################################################################## From 92007dfb7452a1b072dd8f927ae2ada9d4407dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 14:53:10 +0200 Subject: [PATCH 33/53] Change document by accumulate Neo4j db 'clean.js' and 'seed.js' and make the node calls await with flag '--experimental-repl-await' in 'publish.yml' --- deployment/kubernetes/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/kubernetes/README.md b/deployment/kubernetes/README.md index e14ab40..1a9a762 100644 --- a/deployment/kubernetes/README.md +++ b/deployment/kubernetes/README.md @@ -268,7 +268,7 @@ $ kubectl -n default rollout status deployment/ocelot-neo4j --timeout=240s $ kubectl config get-contexts # reset and seed Neo4j database via backend for staging -$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node dist/db/clean.js" -$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node dist/db/seed.js" +$ kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await dist/db/clean.js && node --experimental-repl-await dist/db/seed.js" + ``` From eb8d3903a289177127075dcb56b75202639fa2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 20 Jul 2022 16:17:24 +0200 Subject: [PATCH 34/53] Release v1.0.9-199 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 57fcb26..da08624 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ocelot-social-branded", - "version": "1.0.8", - "ocelotDockerVersionTag": "1.0.8-184", + "version": "1.0.9", + "ocelotDockerVersionTag": "1.0.9-199", "dockerOrganisation": "ocelotsocialnetwork", "description": "ocelot.social Branded", "author": "ocelot.social Community", From 7afb2d688e390c61a985ad3b87b8f4d5da14158f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 25 Jul 2022 18:07:53 +0200 Subject: [PATCH 35/53] Update issue templates --- .github/ISSUE_TEMPLATE/---bug-report.md | 11 +++++++++++ .github/ISSUE_TEMPLATE/---devops-ticket.md | 11 +++++++++++ .github/ISSUE_TEMPLATE/---epic.md | 15 +++++++++++++++ .github/ISSUE_TEMPLATE/---feature-request.md | 11 +++++++++++ .github/ISSUE_TEMPLATE/---question.md | 15 +++++++++++++++ .github/ISSUE_TEMPLATE/---refactor.md | 11 +++++++++++ .github/ISSUE_TEMPLATE/custom.md | 10 ++++++++++ 7 files changed, 84 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/---bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/---devops-ticket.md create mode 100644 .github/ISSUE_TEMPLATE/---epic.md create mode 100644 .github/ISSUE_TEMPLATE/---feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/---question.md create mode 100644 .github/ISSUE_TEMPLATE/---refactor.md create mode 100644 .github/ISSUE_TEMPLATE/custom.md diff --git a/.github/ISSUE_TEMPLATE/---bug-report.md b/.github/ISSUE_TEMPLATE/---bug-report.md new file mode 100644 index 0000000..602283a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---bug-report.md @@ -0,0 +1,11 @@ +--- +name: "\U0001F41B Bug Report" +about: Create a report to help us improve +title: "\U0001F41B [Bug] XXX" +labels: bug +assignees: '' + +--- + +## :bug: Bug Report + diff --git a/.github/ISSUE_TEMPLATE/---devops-ticket.md b/.github/ISSUE_TEMPLATE/---devops-ticket.md new file mode 100644 index 0000000..a382d1f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---devops-ticket.md @@ -0,0 +1,11 @@ +--- +name: "\U0001F4A5 DevOps Ticket" +about: Help us manage our deployed app. +title: "\U0001F4A5 [DevOps] XXX" +labels: '' +assignees: '' + +--- + +## 💥 DevOps Ticket + diff --git a/.github/ISSUE_TEMPLATE/---epic.md b/.github/ISSUE_TEMPLATE/---epic.md new file mode 100644 index 0000000..8dcb195 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---epic.md @@ -0,0 +1,15 @@ +--- +name: "\U0001F31F Epic" +about: Define a big development step. +title: "\U0001F31F [EPIC] XXX" +labels: '' +assignees: '' + +--- + + + + +## 🌟 EPIC + diff --git a/.github/ISSUE_TEMPLATE/---feature-request.md b/.github/ISSUE_TEMPLATE/---feature-request.md new file mode 100644 index 0000000..f387d77 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---feature-request.md @@ -0,0 +1,11 @@ +--- +name: "\U0001F680 Feature Request" +about: Suggest an idea for this project. +title: "\U0001F680 [Feature] XXX" +labels: enhancement +assignees: '' + +--- + +## :rocket: Feature Request + diff --git a/.github/ISSUE_TEMPLATE/---question.md b/.github/ISSUE_TEMPLATE/---question.md new file mode 100644 index 0000000..cbbcaaa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---question.md @@ -0,0 +1,15 @@ +--- +name: "\U0001F4AC Question" +about: If you need help understanding ocelot.social. +title: "\U0001F4AC [Question] XXX" +labels: '' +assignees: '' + +--- + + + + +## 💬 Question + diff --git a/.github/ISSUE_TEMPLATE/---refactor.md b/.github/ISSUE_TEMPLATE/---refactor.md new file mode 100644 index 0000000..fb1ac4e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/---refactor.md @@ -0,0 +1,11 @@ +--- +name: "\U0001F527 Refactor" +about: Help us improve our code by refactoring it. +title: "\U0001F527 [Refactor] XXX" +labels: enhancement +assignees: '' + +--- + +## 🔧 Refactor + diff --git a/.github/ISSUE_TEMPLATE/custom.md b/.github/ISSUE_TEMPLATE/custom.md new file mode 100644 index 0000000..48d5f81 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/custom.md @@ -0,0 +1,10 @@ +--- +name: Custom issue template +about: Describe this issue template's purpose here. +title: '' +labels: '' +assignees: '' + +--- + + From 323b73680a0efe0f7abdde6bc3513a7bc8466fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 3 Aug 2022 15:50:21 +0200 Subject: [PATCH 36/53] Add 'CATEGORIES_ACTIVE' config --- TODO-next-update.md | 7 +++++++ deployment/kubernetes/templates/backend/ConfigMap.yml | 1 + deployment/kubernetes/templates/webapp/ConfigMap.yml | 1 + deployment/kubernetes/values.template.yaml | 1 + 4 files changed, 10 insertions(+) diff --git a/TODO-next-update.md b/TODO-next-update.md index b27f5f1..59bbf83 100644 --- a/TODO-next-update.md +++ b/TODO-next-update.md @@ -2,6 +2,13 @@ When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings … +## This Latest Version > 1.0.9 with 'ocelotDockerVersionTag' 1.0.9-199 + +### PR – chore: 🍰 Release v1.1.0 - Implement Categories Again #63 + +- You have to add the `CATEGORIES_ACTIVE` from the `deployment/kubernetes/values.template.yaml` to your `deployment/kubernetes/values.yaml` and set it to your prevered value. +- Make sure the correct categories are in your Neo4j database on the server. + ## This Latest Version > 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171 ### PR – feat: 🍰 Configure Cookie Expire Time #43 diff --git a/deployment/kubernetes/templates/backend/ConfigMap.yml b/deployment/kubernetes/templates/backend/ConfigMap.yml index a4c8405..1222b0d 100644 --- a/deployment/kubernetes/templates/backend/ConfigMap.yml +++ b/deployment/kubernetes/templates/backend/ConfigMap.yml @@ -14,6 +14,7 @@ data: PRODUCTION_DB_CLEAN_ALLOW: "{{ .Values.PRODUCTION_DB_CLEAN_ALLOW }}" PUBLIC_REGISTRATION: "{{ .Values.PUBLIC_REGISTRATION }}" INVITE_REGISTRATION: "{{ .Values.INVITE_REGISTRATION }}" + CATEGORIES_ACTIVE: "{{ .Values.CATEGORIES_ACTIVE }}" CLIENT_URI: "{{ .Values.BACKEND.CLIENT_URI }}" EMAIL_DEFAULT_SENDER: "{{ .Values.BACKEND.EMAIL_DEFAULT_SENDER }}" SMTP_HOST: "{{ .Values.BACKEND.SMTP_HOST }}" diff --git a/deployment/kubernetes/templates/webapp/ConfigMap.yml b/deployment/kubernetes/templates/webapp/ConfigMap.yml index 685f676..762b355 100644 --- a/deployment/kubernetes/templates/webapp/ConfigMap.yml +++ b/deployment/kubernetes/templates/webapp/ConfigMap.yml @@ -14,6 +14,7 @@ data: HOST: "0.0.0.0" PUBLIC_REGISTRATION: "{{ .Values.PUBLIC_REGISTRATION }}" INVITE_REGISTRATION: "{{ .Values.INVITE_REGISTRATION }}" + CATEGORIES_ACTIVE: "{{ .Values.CATEGORIES_ACTIVE }}" COOKIE_EXPIRE_TIME: "{{ .Values.COOKIE_EXPIRE_TIME }}" WEBSOCKETS_URI: "{{ .Values.WEBAPP.WEBSOCKETS_URI }}" GRAPHQL_URI: "http://{{ .Release.Name }}-backend:4000" \ No newline at end of file diff --git a/deployment/kubernetes/values.template.yaml b/deployment/kubernetes/values.template.yaml index 9b5b751..e601f1a 100644 --- a/deployment/kubernetes/values.template.yaml +++ b/deployment/kubernetes/values.template.yaml @@ -5,6 +5,7 @@ PRODUCTION_DB_CLEAN_ALLOW: false # only true for production environments on stag PUBLIC_REGISTRATION: false INVITE_REGISTRATION: false COOKIE_EXPIRE_TIME: 730 # days (730 days, two years is the default in main code) +CATEGORIES_ACTIVE: false BACKEND: # change all the below if needed From b094bdb27822112a80796978af74c07b6fa9f5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 4 Aug 2022 06:18:18 +0200 Subject: [PATCH 37/53] Refine 'TODO-next-update.md' --- TODO-next-update.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO-next-update.md b/TODO-next-update.md index 59bbf83..f05dfcb 100644 --- a/TODO-next-update.md +++ b/TODO-next-update.md @@ -2,7 +2,7 @@ When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings … -## This Latest Version > 1.0.9 with 'ocelotDockerVersionTag' 1.0.9-199 +## This Latest Version >= 1.1.0 with 'ocelotDockerVersionTag' 1.1.0-205 ### PR – chore: 🍰 Release v1.1.0 - Implement Categories Again #63 From bfa39422385fcfa32842918020268128d69c60db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 4 Aug 2022 06:19:03 +0200 Subject: [PATCH 38/53] Release v1.1.0-205 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index da08624..1bbd611 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ocelot-social-branded", - "version": "1.0.9", - "ocelotDockerVersionTag": "1.0.9-199", + "version": "1.1.0", + "ocelotDockerVersionTag": "1.1.0-205", "dockerOrganisation": "ocelotsocialnetwork", "description": "ocelot.social Branded", "author": "ocelot.social Community", From 0285c4c622891463fe2fe944bbc2b9d7e10035ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 13 Sep 2022 15:01:51 +0200 Subject: [PATCH 39/53] Add documentation for `PRODUCTION_DB_CLEAN_ALLOW` --- TODO-next-update.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TODO-next-update.md b/TODO-next-update.md index 4585364..c324ad9 100644 --- a/TODO-next-update.md +++ b/TODO-next-update.md @@ -2,10 +2,12 @@ When you overtake this deploy and rebrand repo to your network you have to recognize the following changes and doings … -## Version > 1.0.8 with 'ocelotDockerVersionTag' 1.0.8-182 +## Version 1.0.9 with 'ocelotDockerVersionTag' 1.0.9-199 ### Deployment/Rebranding PR – chore: [WIP] 🍰 Refine docs, first step #46 +- PR: `chore: 🍰 Implement PRODUCTION_DB_CLEAN_ALLOW for Staging Production Environments #56` + - Copy `PRODUCTION_DB_CLEAN_ALLOW` from `values.template.yaml` to `values.yaml` and set it to `false` for production envireonments and only for several stage test servers to `true`. - Commit: `Update cert-manager apiVersion "cert-manager.io/v1alpha2" to "cert-manager.io/v1" - Check for `kubectl` and `helm` versions. From c68499c2a8adde36bd9d9d2cf4221e7332a74bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 13 Sep 2022 15:39:44 +0200 Subject: [PATCH 40/53] Remove live networks --- README.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/README.md b/README.md index a57f184..9b70d3a 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,6 @@ Logins: | `moderator@example.org` | 1234 | moderator | | `admin@example.org` | 1234 | admin | -Deployed networks can be found [here](#list-of-deployed-networks). - ## Usage Fork this repository to configure and rebrand it for your own [ocelot.social](https://github.com/Ocelot-Social-Community/Ocelot-Social) network. @@ -130,20 +128,6 @@ Browser compatibility testing with [BrowserStack](https://www.browserstack.com/) BrowserStack Logo --> -## List Of Deployed Networks - -You may need an invitation to access a network. - -### More Likely To Try - -- [wir.social](https://wir.social) - -### Others - -- [freilernen.social](https://freilernen.social) -- [helfa.social](https://helfa.social) -- [sender.fm](https://sender.fm) - ## License See the [LICENSE](/LICENSE.md) file for license rights and limitations (MIT). From ba4ad7550851e9bbfc2eb586a1c668e262b1865e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 13 Sep 2022 16:25:31 +0200 Subject: [PATCH 41/53] Refine main readme for cert-manager and kubectl version --- deployment/kubernetes/README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/deployment/kubernetes/README.md b/deployment/kubernetes/README.md index 868676d..0f7ecd2 100644 --- a/deployment/kubernetes/README.md +++ b/deployment/kubernetes/README.md @@ -46,6 +46,10 @@ Please have a look here: - [Installing with Helm](https://cert-manager.io/docs/installation/helm/#installing-with-helm) +Our Helm installation is optimized for cert-manager version `v1.9.1` and `kubectl` version `"v1.24.2`. + +Please search here for cert-manager versions that are compatible with your `kubectl` version on the cluster and on the client: [cert-manager Supported Releases](https://cert-manager.io/docs/installation/supported-releases/#supported-releases). + ***ATTENTION:*** *When uninstalling cert-manager, be sure to use the same method as for installation! Otherwise, we could end up in a broken state, see [Uninstall](https://cert-manager.io/docs/installation/kubectl/#uninstalling).* ### Ingress-Nginx -#### 1. Add Helm repository and update +#### 1. Add Helm repository for `ingress-nginx` and update ```bash $ helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx @@ -160,7 +164,7 @@ $ doctl compute firewall get --context This chart is only necessary (recommended is more precise) if you run DigitalOcean without load balancer. You need to generate an access token with read + write for the `dns.values.yaml` at and fill it in. -#### 1. Add Helm repository and update +#### 1. Add Helm repository for `binami` and update ```bash $ helm repo add bitnami https://charts.bitnami.com/bitnami From 8d6a80cc3a24c35c97a0e747267a432a1b8e9e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Tue, 13 Sep 2022 16:48:59 +0200 Subject: [PATCH 42/53] Release v1.1.0-225 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1bbd611..021f7ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ocelot-social-branded", "version": "1.1.0", - "ocelotDockerVersionTag": "1.1.0-205", + "ocelotDockerVersionTag": "1.1.0-225", "dockerOrganisation": "ocelotsocialnetwork", "description": "ocelot.social Branded", "author": "ocelot.social Community", From 870fe89a80ca031782629a60aff3ccfbe134797c Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 22 Sep 2022 19:49:24 +0200 Subject: [PATCH 43/53] refactor rebranding --- branding/assets/styles/import/_branding.scss | 5 +++++ branding/constants/headerMenu.js | 12 ++++++++++++ branding/constants/logos.js | 1 + docker-compose.ocelotsocial-branded.yml | 4 ++++ docker-compose.yml | 4 ++++ docker/webapp.Dockerfile | 2 ++ 6 files changed, 28 insertions(+) create mode 100644 branding/assets/styles/import/_branding.scss create mode 100644 branding/constants/headerMenu.js diff --git a/branding/assets/styles/import/_branding.scss b/branding/assets/styles/import/_branding.scss new file mode 100644 index 0000000..7505859 --- /dev/null +++ b/branding/assets/styles/import/_branding.scss @@ -0,0 +1,5 @@ +/* + * + * Here, all SCSS variables and classes can be adapted to your custom design. + * +*/ \ No newline at end of file diff --git a/branding/constants/headerMenu.js b/branding/constants/headerMenu.js new file mode 100644 index 0000000..33cba8d --- /dev/null +++ b/branding/constants/headerMenu.js @@ -0,0 +1,12 @@ +export default { + MENU: [ + // { + // name: 'Beiträge', + // path: '/#', + // }, + // { + // name: 'Über Yunite', + // url: 'https://yunite.org', + // }, + ], +} diff --git a/branding/constants/logos.js b/branding/constants/logos.js index d093c7b..2bea199 100644 --- a/branding/constants/logos.js +++ b/branding/constants/logos.js @@ -2,6 +2,7 @@ // this are the paths in the webapp export default { LOGO_HEADER_PATH: '/img/custom/logo-horizontal.svg', + LOGO_HEADER_WIDTH: '130px', LOGO_SIGNUP_PATH: '/img/custom/logo-squared.svg', LOGO_WELCOME_PATH: '/img/custom/logo-squared.svg', LOGO_LOGOUT_PATH: '/img/custom/logo-squared.svg', diff --git a/docker-compose.ocelotsocial-branded.yml b/docker-compose.ocelotsocial-branded.yml index b8c3ce4..0c42d62 100644 --- a/docker-compose.ocelotsocial-branded.yml +++ b/docker-compose.ocelotsocial-branded.yml @@ -21,6 +21,8 @@ services: - MAPBOX_TOKEN="pk.eyJ1IjoiYnVzZmFrdG9yIiwiYSI6ImNraDNiM3JxcDBhaWQydG1uczhpZWtpOW4ifQ.7TNRTO-o9aK1Y6MyW_Nd4g" # - WEBSOCKETS_URI=ws://backend:4000/graphql # is not working and not given in Docker YAML in main repo - PUBLIC_REGISTRATION=true + - INVITE_REGISTRATION=true + - CATEGORIES_ACTIVE=true ######################################################## # BACKEND ############################################## @@ -47,6 +49,8 @@ services: - EMAIL_DEFAULT_SENDER=info@wir.social # - PRODUCTION_DB_CLEAN_ALLOW=false # only true for production environments on staging servers - PUBLIC_REGISTRATION=true + - INVITE_REGISTRATION=true + - CATEGORIES_ACTIVE=true - SMTP_USERNAME=${SMTP_USERNAME} - SMTP_PASSWORD=${SMTP_PASSWORD} - SMTP_HOST=mailserver diff --git a/docker-compose.yml b/docker-compose.yml index 285a0d3..535d485 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,8 @@ services: - MAPBOX_TOKEN="pk.eyJ1IjoiYnVzZmFrdG9yIiwiYSI6ImNraDNiM3JxcDBhaWQydG1uczhpZWtpOW4ifQ.7TNRTO-o9aK1Y6MyW_Nd4g" # - WEBSOCKETS_URI=ws://backend:4000/graphql # is not working and not given in Docker YAML in main repo - PUBLIC_REGISTRATION=true + - INVITE_REGISTRATION=true + - CATEGORIES_ACTIVE=true ######################################################## # BACKEND ############################################## @@ -56,6 +58,8 @@ services: - EMAIL_DEFAULT_SENDER=info@wir.social # - PRODUCTION_DB_CLEAN_ALLOW=false # only true for production environments on staging servers - PUBLIC_REGISTRATION=true + - INVITE_REGISTRATION=true + - CATEGORIES_ACTIVE=true - SMTP_USERNAME=${SMTP_USERNAME} - SMTP_PASSWORD=${SMTP_PASSWORD} - SMTP_HOST=mailserver diff --git a/docker/webapp.Dockerfile b/docker/webapp.Dockerfile index 1d7ee67..81748e0 100644 --- a/docker/webapp.Dockerfile +++ b/docker/webapp.Dockerfile @@ -13,6 +13,7 @@ FROM $APP_IMAGE_CODE as code COPY branding/static/ static/ COPY branding/constants/ constants/ COPY branding/locales/ locales/ +COPY branding/assets/styles/imports/ assets/styles/imports/ ################################################################################## # BUILD ########################################################################## @@ -41,6 +42,7 @@ COPY --from=build ${DOCKER_WORKDIR}/config/ ./config/ COPY --from=build ${DOCKER_WORKDIR}/constants ./constants COPY --from=build ${DOCKER_WORKDIR}/static ./static COPY --from=build ${DOCKER_WORKDIR}/locales ./locales +COPY --from=build ${DOCKER_WORKDIR}/assets/styles/imports ./assets/styles/imports # Copy package.json for script definitions (lock file should not be needed) COPY --from=build ${DOCKER_WORKDIR}/package.json ./package.json From 5f967f563a37bda6d1dd8db1e80fc4b81607b5fd Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 22 Sep 2022 20:48:40 +0200 Subject: [PATCH 44/53] update package.json to v1.1.1 -228 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 021f7ca..61afb1f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ocelot-social-branded", - "version": "1.1.0", - "ocelotDockerVersionTag": "1.1.0-225", + "version": "1.1.1", + "ocelotDockerVersionTag": "1.1.1-228", "dockerOrganisation": "ocelotsocialnetwork", "description": "ocelot.social Branded", "author": "ocelot.social Community", From e0b2b098cfc544c6704a023c9ee54558a31ecc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Fri, 23 Sep 2022 07:20:14 +0200 Subject: [PATCH 45/53] Fix folder name from `branding/assets/styles/import` to `branding/assets/styles/imports` --- branding/assets/styles/{import => imports}/_branding.scss | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename branding/assets/styles/{import => imports}/_branding.scss (100%) diff --git a/branding/assets/styles/import/_branding.scss b/branding/assets/styles/imports/_branding.scss similarity index 100% rename from branding/assets/styles/import/_branding.scss rename to branding/assets/styles/imports/_branding.scss From 111b1da00d3d45d0708ca33036d33a2502b3f6a6 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 11 Oct 2022 18:59:52 +0200 Subject: [PATCH 46/53] test jq to merge locale files --- docker/webapp.Dockerfile | 3 +++ tools/test/file1.json | 12 ++++++++++++ tools/test/file2.json | 11 +++++++++++ tools/test/result.json | 15 +++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 tools/test/file1.json create mode 100644 tools/test/file2.json create mode 100644 tools/test/result.json diff --git a/docker/webapp.Dockerfile b/docker/webapp.Dockerfile index 81748e0..5c3f98f 100644 --- a/docker/webapp.Dockerfile +++ b/docker/webapp.Dockerfile @@ -15,6 +15,9 @@ COPY branding/constants/ constants/ COPY branding/locales/ locales/ COPY branding/assets/styles/imports/ assets/styles/imports/ +## Something like (bash, jq must be installed) +# for locale in `ls locales/*.json`; do jq -s '.[0] * .[1]' source/$locale $locale; done; + ################################################################################## # BUILD ########################################################################## ################################################################################## diff --git a/tools/test/file1.json b/tools/test/file1.json new file mode 100644 index 0000000..19ec4e1 --- /dev/null +++ b/tools/test/file1.json @@ -0,0 +1,12 @@ +{ + "a-key": "A", + "b-key": { + "a-subkey": "A", + "b-subkey": "B", + "c-subkey": { + "a-subsubkey": "A", + "b-subsubkey": "B" + } + }, + "c-key": "C" +} diff --git a/tools/test/file2.json b/tools/test/file2.json new file mode 100644 index 0000000..e4d7ade --- /dev/null +++ b/tools/test/file2.json @@ -0,0 +1,11 @@ +{ + "a-key": "AA", + "b-key": { + "b-subkey": "BB", + "c-subkey": { + "b-subsubkey": "BB", + "c-subsubkey": "C" + } + }, + "d-key": "D" +} diff --git a/tools/test/result.json b/tools/test/result.json new file mode 100644 index 0000000..843c235 --- /dev/null +++ b/tools/test/result.json @@ -0,0 +1,15 @@ +{ + "a-key": "AA", + "b-key": { + "a-subkey": "A", + "b-subkey": "BB", + "c-subkey": { + "a-subsubkey": "A", + "b-subsubkey": "BB", + "c-subsubkey": "C" + } + }, + "c-key": "C", + "d-key": "D" +} + From 9045ac3199545789ffd47ece6f5997371b0ebe0f Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 12 Oct 2022 15:33:07 +0200 Subject: [PATCH 47/53] add script to merge variables --- branding/locales/de.json | 3 +++ docker/webapp.Dockerfile | 8 +++++++- tools/merge-locales.sh | 10 ++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 branding/locales/de.json create mode 100755 tools/merge-locales.sh diff --git a/branding/locales/de.json b/branding/locales/de.json new file mode 100644 index 0000000..7fa1f1b --- /dev/null +++ b/branding/locales/de.json @@ -0,0 +1,3 @@ +{ + "new-key": "This is a new key" +} diff --git a/docker/webapp.Dockerfile b/docker/webapp.Dockerfile index 5c3f98f..104b484 100644 --- a/docker/webapp.Dockerfile +++ b/docker/webapp.Dockerfile @@ -12,9 +12,15 @@ FROM $APP_IMAGE_CODE as code # copy public constants into the Docker image to brand it COPY branding/static/ static/ COPY branding/constants/ constants/ -COPY branding/locales/ locales/ +COPY branding/locales/html/ locales/html/ +# COPY branding/locales/index.js locales/index.js +COPY branding/locales/*.json locales/tmp/ COPY branding/assets/styles/imports/ assets/styles/imports/ +RUN apk add --no-cache bash jq + +RUN tools/merge-locales.sh + ## Something like (bash, jq must be installed) # for locale in `ls locales/*.json`; do jq -s '.[0] * .[1]' source/$locale $locale; done; diff --git a/tools/merge-locales.sh b/tools/merge-locales.sh new file mode 100755 index 0000000..8fc5c75 --- /dev/null +++ b/tools/merge-locales.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +for locale in `ls locales/*.json`; +do + file = basename $locale; + if [ -f locales/tmp/$file ]; then + jq -s '.[0] * .[1]' $locale locales/tmp/$file > locales/tmp/tmp.json; + mv locales/tmp/tmp.json $locale; + fi; +done; From ebf8894ca25b5dfeec032390ea42fc5c961891b4 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 12 Oct 2022 15:58:28 +0200 Subject: [PATCH 48/53] remove tmp folder, test for override of existing locales --- branding/locales/de.json | 5 +++++ docker/webapp.Dockerfile | 4 +--- tools/merge-locales.sh | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/branding/locales/de.json b/branding/locales/de.json index 7fa1f1b..8f42e89 100644 --- a/branding/locales/de.json +++ b/branding/locales/de.json @@ -1,3 +1,8 @@ { +"user": { + "avatar": { + "submitted": "XXXXXXX" + } + }, "new-key": "This is a new key" } diff --git a/docker/webapp.Dockerfile b/docker/webapp.Dockerfile index 104b484..ba7cbff 100644 --- a/docker/webapp.Dockerfile +++ b/docker/webapp.Dockerfile @@ -10,6 +10,7 @@ ARG APP_IMAGE_CODE=${APP_IMAGE}:${APP_IMAGE_TAG_CODE} FROM $APP_IMAGE_CODE as code # copy public constants into the Docker image to brand it +COPY tools/ tools/ COPY branding/static/ static/ COPY branding/constants/ constants/ COPY branding/locales/html/ locales/html/ @@ -21,9 +22,6 @@ RUN apk add --no-cache bash jq RUN tools/merge-locales.sh -## Something like (bash, jq must be installed) -# for locale in `ls locales/*.json`; do jq -s '.[0] * .[1]' source/$locale $locale; done; - ################################################################################## # BUILD ########################################################################## ################################################################################## diff --git a/tools/merge-locales.sh b/tools/merge-locales.sh index 8fc5c75..21d2632 100755 --- a/tools/merge-locales.sh +++ b/tools/merge-locales.sh @@ -2,9 +2,11 @@ for locale in `ls locales/*.json`; do - file = basename $locale; + file=$(basename $locale); if [ -f locales/tmp/$file ]; then jq -s '.[0] * .[1]' $locale locales/tmp/$file > locales/tmp/tmp.json; mv locales/tmp/tmp.json $locale; fi; done; + +rm -r locales/tmp/ From a1ce8049957bfb4388a12f3cec64e1309ed6d15a Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 12 Oct 2022 16:29:20 +0200 Subject: [PATCH 49/53] clean up --- branding/locales/de.json | 8 -------- tools/test/file1.json | 12 ------------ tools/test/file2.json | 11 ----------- tools/test/result.json | 15 --------------- 4 files changed, 46 deletions(-) delete mode 100644 branding/locales/de.json delete mode 100644 tools/test/file1.json delete mode 100644 tools/test/file2.json delete mode 100644 tools/test/result.json diff --git a/branding/locales/de.json b/branding/locales/de.json deleted file mode 100644 index 8f42e89..0000000 --- a/branding/locales/de.json +++ /dev/null @@ -1,8 +0,0 @@ -{ -"user": { - "avatar": { - "submitted": "XXXXXXX" - } - }, - "new-key": "This is a new key" -} diff --git a/tools/test/file1.json b/tools/test/file1.json deleted file mode 100644 index 19ec4e1..0000000 --- a/tools/test/file1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "a-key": "A", - "b-key": { - "a-subkey": "A", - "b-subkey": "B", - "c-subkey": { - "a-subsubkey": "A", - "b-subsubkey": "B" - } - }, - "c-key": "C" -} diff --git a/tools/test/file2.json b/tools/test/file2.json deleted file mode 100644 index e4d7ade..0000000 --- a/tools/test/file2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "a-key": "AA", - "b-key": { - "b-subkey": "BB", - "c-subkey": { - "b-subsubkey": "BB", - "c-subsubkey": "C" - } - }, - "d-key": "D" -} diff --git a/tools/test/result.json b/tools/test/result.json deleted file mode 100644 index 843c235..0000000 --- a/tools/test/result.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "a-key": "AA", - "b-key": { - "a-subkey": "A", - "b-subkey": "BB", - "c-subkey": { - "a-subsubkey": "A", - "b-subsubkey": "BB", - "c-subsubkey": "C" - } - }, - "c-key": "C", - "d-key": "D" -} - From be603a5af237d031693e8429f4c0499af7c4fdd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 13 Oct 2022 15:11:42 +0200 Subject: [PATCH 50/53] =?UTF-8?q?Set=20this=20branch=20as=20publishing=20b?= =?UTF-8?q?ranch=20for=20testing=20purposes=20=E2=80=93=20revert=20later?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2743a25..7ad535d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: branches: - master - # - 55-implement-PRODUCTION_DB_CLEAN_ALLOW-for-staging-production-evironments # for testing while developing + - 79-fix-implementation-of-overwriting-locales # for testing while developing jobs: ############################################################################## From 0cf00fdc078514d173563b92249e91c8f49da975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 13 Oct 2022 15:13:34 +0200 Subject: [PATCH 51/53] Fix copy error by adding two empty JSON files to the locales --- branding/locales/de.json | 2 ++ branding/locales/en.json | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 branding/locales/de.json create mode 100644 branding/locales/en.json diff --git a/branding/locales/de.json b/branding/locales/de.json new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/branding/locales/de.json @@ -0,0 +1,2 @@ +{ +} diff --git a/branding/locales/en.json b/branding/locales/en.json new file mode 100644 index 0000000..2c63c08 --- /dev/null +++ b/branding/locales/en.json @@ -0,0 +1,2 @@ +{ +} From 4479fb4cbc7aeec86f5b451353635a221f49e6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 13 Oct 2022 16:55:39 +0200 Subject: [PATCH 52/53] Revert the publish branch --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7ad535d..5cbdf90 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - 79-fix-implementation-of-overwriting-locales # for testing while developing + # - 79-fix-implementation-of-overwriting-locales # for testing while developing jobs: ############################################################################## From 6aacbbf2355c6146e105bb39adb033b031f09676 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Sat, 15 Oct 2022 11:08:12 +0200 Subject: [PATCH 53/53] corrected badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c47b821..039b0f8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Wir.Social Deploys And Rebrands Ocelot.Social -[![Build Status Publish](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/actions/workflows/publish.yml/badge.svg)](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/actions) -[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/blob/LICENSE.md) +[![Build Status Publish](https://github.com/wir-social/wir-social/actions/workflows/publish.yml/badge.svg)](https://github.com/wir-social/wir-social/actions) +[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/wir-social/wir-social/blob/LICENSE.md) [![Discord Channel](https://img.shields.io/discord/489522408076738561.svg)](https://discord.gg/AJSX9DCSUA) [![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)