From f22cc43b6c0d83ff00492f1b457dddd91de5b726 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Wed, 11 Dec 2024 06:09:14 +0100 Subject: [PATCH] update repo --- .github/workflows/publish.yml | 6 ++-- LICENSE | 21 ------------- LICENSE.md | 11 +++++++ TODO-next-update.md | 32 ++++++++++++++++++++ helmfile/environments/default.yaml.gotmpl | 10 +++--- helmfile/environments/production.yaml.gotmpl | 11 +++++++ helmfile/helmfile.yaml.gotmpl | 9 ++++-- helmfile/secrets/ocelot.yaml | 8 ++--- helmfile/values/ocelot.yaml.gotmpl | 9 +++++- 9 files changed, 81 insertions(+), 36 deletions(-) delete mode 100644 LICENSE create mode 100644 LICENSE.md create mode 100644 TODO-next-update.md create mode 100644 helmfile/environments/production.yaml.gotmpl diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3e1e651..4f16f74 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,6 +32,8 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Read $OCELOT_VERSION from file + run: cat .env >> $GITHUB_ENV - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@70b2cdc6480c1a8b86edf1777157f8f437de2166 @@ -45,8 +47,8 @@ jobs: type=ref,event=branch type=ref,event=pr type=sha - - name: Read $OCELOT_VERSION from file - run: cat .env >> $GITHUB_ENV + labels: | + ocelot-version=${{ env.OCELOT_VERSION }} - name: Build and push Docker images id: push uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 19dda9d..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 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: - -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/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..69cc340 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,11 @@ +# LICENSE + +MIT License + +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: + +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/TODO-next-update.md b/TODO-next-update.md new file mode 100644 index 0000000..4cf3c8d --- /dev/null +++ b/TODO-next-update.md @@ -0,0 +1,32 @@ +# 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.1.0 with 'ocelotDockerVersionTag' 1.1.0-205 + +### Deployment/Rebranding 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. + +## Version >= 1.0.9 with 'ocelotDockerVersionTag' 1.0.9-199 + +### Deployment/Rebranding PR – chore: 🍰 Implement PRODUCTION_DB_CLEAN_ALLOW for Staging Production Environments #56 + +- Copy `PRODUCTION_DB_CLEAN_ALLOW` from `deployment/kubernetes/values.template.yaml` to `values.yaml` and set it to `false` for production envireonments and only for several stage test servers to `true`. + +### 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 + +- 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 `locale` cookie exploration time in data privacy. + +## Version 1.0.7 with 'ocelotDockerVersionTag' 1.0.7-171 + +- No informations. diff --git a/helmfile/environments/default.yaml.gotmpl b/helmfile/environments/default.yaml.gotmpl index 139014e..b355b77 100644 --- a/helmfile/environments/default.yaml.gotmpl +++ b/helmfile/environments/default.yaml.gotmpl @@ -1,7 +1,7 @@ -{{ $branded_image_tag:= env "BRANDED_IMAGE_TAG" | default (exec "../scripts/branded_image_tag.sh" (list) | trim) }} -{{ $ocelot_image_tag := env "OCELOT_IMAGE_TAG" | default (exec "../scripts/ocelot_image_tag.sh" (list) | trim) }} +{{ $image_tag := env "IMAGE_TAG" | default (exec "../scripts/branded_image_tag.sh" (list) | trim) }} -domain: freilernen.ocelot-social.it4c.org -namespace: freilernen-ocelot -image_tag: {{ env "IMAGE_TAG" | default (printf "ocelot-%s--branded-%s" $ocelot_image_tag $branded_image_tag) }} +domain: freilernen-social-staging.ocelot-social.it4c.org +redirect_domains: [] +namespace: freilernen-social-ocelot +image_tag: {{ $image_tag }} github_repository: wir-social/freilernen.social diff --git a/helmfile/environments/production.yaml.gotmpl b/helmfile/environments/production.yaml.gotmpl new file mode 100644 index 0000000..0084231 --- /dev/null +++ b/helmfile/environments/production.yaml.gotmpl @@ -0,0 +1,11 @@ +#{{ $branded_image_tag:= env "BRANDED_IMAGE_TAG" | default (exec "../scripts/branded_image_tag.sh" (list) | trim) }} +#{{ $ocelot_image_tag := env "OCELOT_IMAGE_TAG" | default (exec "../scripts/ocelot_image_tag.sh" (list) | trim) }} +{{ $image_tag := env "IMAGE_TAG" | default (exec "../scripts/branded_image_tag.sh" (list) | trim) }} + +domain: freilernen.social +redirect_domains: | # i don't understand it, but its the way to get it to work: https://stackoverflow.com/a/52840704 + [ "www.freilernen.social"] +namespace: freilernen-social-ocelot-production +#image_tag: {{ env "IMAGE_TAG" | default (printf "ocelot-%s--branded-%s" $ocelot_image_tag $branded_image_tag) }} +image_tag: {{ $image_tag }} +github_repository: wir-social/freilernen.social diff --git a/helmfile/helmfile.yaml.gotmpl b/helmfile/helmfile.yaml.gotmpl index 02ac5a0..df89a44 100644 --- a/helmfile/helmfile.yaml.gotmpl +++ b/helmfile/helmfile.yaml.gotmpl @@ -3,6 +3,9 @@ environments: default: values: - ./environments/default.yaml.gotmpl + production: + values: + - ./environments/production.yaml.gotmpl --- repositories: - name: ocelot-social @@ -15,12 +18,12 @@ releases: values: - ./values/ocelot.yaml.gotmpl secrets: - - ./secrets/ocelot.yaml + - ./secrets/ocelot.yaml - name: ocelot-neo4j namespace: {{ .StateValues.namespace }} - chart: ocelot-social/ocelot-social + chart: ocelot-social/ocelot-neo4j values: - ./values/ocelot.yaml.gotmpl secrets: - - ./secrets/ocelot.yaml + - ./secrets/ocelot.yaml diff --git a/helmfile/secrets/ocelot.yaml b/helmfile/secrets/ocelot.yaml index fcc0191..bf8e75c 100644 --- a/helmfile/secrets/ocelot.yaml +++ b/helmfile/secrets/ocelot.yaml @@ -1,5 +1,5 @@ secrets: - acme_email: ENC[AES256_GCM,data:REcl0BYya0a140f1AgTim1cBmtM=,iv:Wuhk6ht5TIQLCsjMmzTDJONm56/t8kPjAF6DnhpiQ+E=,tag:iyQ+EoonRk3uBdDWkw/HKQ==,type:str] + acme_email: ENC[AES256_GCM,data:fLVDVocnZA9XmBLGfdqzRcYBMB4=,iv:2zOAEFwS3ycxIBSgLKNRJ4jknuBmG8nTt5l4PvKCNDU=,tag:rp9TqpiJRmHZAejZBg7pMQ==,type:str] webapp: env: MAPBOX_TOKEN: ENC[AES256_GCM,data:7Ka4BvQh6NDw9NKUcgGjLwxNHOqhVrZEj/DcGnyv1nXQIG/2WWGGHazAFWUCFpCUmCSaTPSkyLHPFyGQtQ7VAON3AG3tHtv5JvcBb4KDYrjAIzxhAAiHMYFtVJs=,iv:X0YL2dW42TUidJdBlRKb4Vq86X1OzHqipNHTBxmE7ds=,tag:KDH9NwDy6ghqdkXeZxuHgg==,type:str] @@ -87,8 +87,8 @@ sops: Tkx0VFJpN1pZam4yeTNYU1Jnb1JyR1EKJSQYyAi9ZZr+njaXV/62nshPVLtWIcLY pwP8ikur4tKrbyg7H+/f3+9jPsr2Jw3xxgkeS4GL+DsTwrGDEwoaiw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-10-29T16:44:49Z" - mac: ENC[AES256_GCM,data:5Vc2pwT37LAxNMFcsA6ZbKA04PfFLSkonE6BH2VRfGNO7qXaHo0FTVg9COgx/xoIVamFmqE5nGBqOzRoHalYp5NS9QvNUbiB2kIMMNPsCOD0AFcdsLg8AcyRmwqS5foxcthzWdudB/E5fnbD94K8aSH7cU4tQgiDRnOSKUNNmdg=,iv:wcyPAmDeaXO4t/R7IqZVYIAxBXTVXn00+jmmUviCFxE=,tag:V6QNtYLbPuw24eLNvXK64Q==,type:str] + lastmodified: "2024-12-11T05:03:24Z" + mac: ENC[AES256_GCM,data:gEHsNuIBHLRyfVuEqrnZ6OZx4DcueqLW58o9CAFneOMDd8Jhx2CFHj4JQ9QJfd6Ydidv0Z1SLuLIimp7kzyBF7FzJ6MOOl+1jYM6gT7Jvni/ni2T+s9QK4NFoh0/gne7DR1EB59ls+Z4RRjcLQqBRQBS1oKaDM99MLCfysbTLpA=,iv:dABZTxC7ETyxyExSgzzDbosO7BG1rIAWlHinzNA2tJI=,tag:vBSsr2AJBhhn2mk8IoL52w==,type:str] pgp: [] unencrypted_suffix: _unencrypted - version: 3.9.0 + version: 3.9.1 diff --git a/helmfile/values/ocelot.yaml.gotmpl b/helmfile/values/ocelot.yaml.gotmpl index 95c8bc9..ea06bfd 100644 --- a/helmfile/values/ocelot.yaml.gotmpl +++ b/helmfile/values/ocelot.yaml.gotmpl @@ -1,4 +1,5 @@ domain: {{ .StateValues.domain }} +redirect_domains: {{ .StateValues.redirect_domains }} cert_manager: issuer: {{ .Release.Name }}-letsencrypt-prod @@ -15,7 +16,8 @@ backend: repository: ghcr.io/{{ .StateValues.github_repository | lower }}/backend storage: "10Gi" env: - PRODUCTION_DB_CLEAN_ALLOW: "true" + NEO4J_URI: "bolt://ocelot-neo4j-neo4j:7687" + # PRODUCTION_DB_CLEAN_ALLOW: "true" PUBLIC_REGISTRATION: "true" INVITE_REGISTRATION: "true" CATEGORIES_ACTIVE: @@ -34,3 +36,8 @@ neo4j: tag: hetzner storage: "5Gi" storageBackups: "10Gi" + resources: + requests: + memory: "2Gi" + limits: + memory: "4Gi"