From 442dcd1046dd57eeecf44efd115f6cb16cae44a0 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Thu, 8 Feb 2024 15:51:07 +0100 Subject: [PATCH 1/4] prevent warning, fix env error --- backend/.env.template | 2 +- backend/src/server/createServer.ts | 2 ++ deployment/bare_metal/.env.dist | 1 - deployment/bare_metal/start.sh | 8 ++++++-- dlt-connector/src/server/createServer.ts | 2 ++ federation/src/server/createServer.ts | 2 ++ 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/backend/.env.template b/backend/.env.template index 5165dcef3..4ccd60333 100644 --- a/backend/.env.template +++ b/backend/.env.template @@ -54,7 +54,7 @@ EMAIL_LINK_VERIFICATION_PATH=$EMAIL_LINK_VERIFICATION_PATH EMAIL_LINK_SETPASSWORD_PATH=$EMAIL_LINK_SETPASSWORD_PATH EMAIL_LINK_FORGOTPASSWORD_PATH=$EMAIL_LINK_FORGOTPASSWORD_PATH EMAIL_LINK_OVERVIEW_PATH=$EMAIL_LINK_OVERVIEW_PATH -EMAIL_CODE_VALID_TIME=$EMAIL_CODE_VALID_TIME_PATH +EMAIL_CODE_VALID_TIME=$EMAIL_CODE_VALID_TIME EMAIL_CODE_REQUEST_TIME=$EMAIL_CODE_REQUEST_TIME # Webhook diff --git a/backend/src/server/createServer.ts b/backend/src/server/createServer.ts index 250a4b901..3f02b0afc 100644 --- a/backend/src/server/createServer.ts +++ b/backend/src/server/createServer.ts @@ -79,6 +79,8 @@ export const createServer = async ( */ }) app.use(limiter) + // because of nginx proxy, needed for limiter + app.set('trust proxy', 1) // bodyparser json app.use(json()) diff --git a/deployment/bare_metal/.env.dist b/deployment/bare_metal/.env.dist index deba914b1..88962bd4c 100644 --- a/deployment/bare_metal/.env.dist +++ b/deployment/bare_metal/.env.dist @@ -30,7 +30,6 @@ FRONTEND_CONFIG_VERSION=v5.2024-01-08 ADMIN_CONFIG_VERSION=v2.2024-01-04 FEDERATION_CONFIG_VERSION=v2.2023-08-24 FEDERATION_DHT_CONFIG_VERSION=v4.2024-01-17 - FEDERATION_DHT_TOPIC=GRADIDO_HUB # Need adjustments for test system diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh index 4b6498ee0..af8986318 100755 --- a/deployment/bare_metal/start.sh +++ b/deployment/bare_metal/start.sh @@ -1,5 +1,9 @@ #!/bin/bash - +# check for parameter +if [ -z "$1" ]; then + echo "Usage: Please provide a branch name as the first argument." + exit 1 +fi # Find current directory & configure paths set -o allexport SCRIPT_PATH=$(realpath $0) @@ -80,7 +84,7 @@ pm2 delete all pm2 save # git -BRANCH=${1:-master} +BRANCH=$1 echo "Starting with git pull - branch:$BRANCH" >> $UPDATE_HTML cd $PROJECT_ROOT # TODO: this overfetches alot, but ensures we can use start.sh with tags diff --git a/dlt-connector/src/server/createServer.ts b/dlt-connector/src/server/createServer.ts index 50e8d96cb..25e0a12e2 100755 --- a/dlt-connector/src/server/createServer.ts +++ b/dlt-connector/src/server/createServer.ts @@ -62,6 +62,8 @@ const createServer = async ( */ }) app.use(limiter) + // because of nginx proxy, needed for limiter + app.set('trust proxy', 1) await apollo.start() app.use( diff --git a/federation/src/server/createServer.ts b/federation/src/server/createServer.ts index 97729b882..3d3b80dd6 100644 --- a/federation/src/server/createServer.ts +++ b/federation/src/server/createServer.ts @@ -84,6 +84,8 @@ export const createServer = async ( */ }) app.use(limiter) + // because of nginx proxy, needed for limiter + app.set('trust proxy', 1) // bodyparser json app.use(express.json()) From 7ba2cb0d95b4cdcce8ac1a292491a9cb3c2ed6bc Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Thu, 8 Feb 2024 17:47:19 +0100 Subject: [PATCH 2/4] release, improve release script --- CHANGELOG.md | 20 ++++++++++++++++++++ admin/package.json | 2 +- backend/package.json | 2 +- database/package.json | 2 +- dht-node/package.json | 2 +- dlt-connector/package.json | 2 +- federation/package.json | 2 +- frontend/package.json | 2 +- package.json | 2 +- scripts/release.sh | 2 +- 10 files changed, 29 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a728f21ea..bbb49eaf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,28 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [2.2.0](https://github.com/gradido/gradido/compare/2.1.1...2.2.0) + +- feat(frontend): update news text [`#3279`](https://github.com/gradido/gradido/pull/3279) +- feat(frontend): use params instead of query for send/identifier route [`#3277`](https://github.com/gradido/gradido/pull/3277) +- fix(other): deployment bugfixes [`#3276`](https://github.com/gradido/gradido/pull/3276) +- refactor(other): federation optimize logging, fix bug [`#3272`](https://github.com/gradido/gradido/pull/3272) +- feat(other): request limit [`#3274`](https://github.com/gradido/gradido/pull/3274) +- feat(dlt): logging views [`#3270`](https://github.com/gradido/gradido/pull/3270) +- refactor(other): hetzner cloud deploy, refactor .env [`#3267`](https://github.com/gradido/gradido/pull/3267) +- refactor(dlt): dlt connector try out dci [`#3223`](https://github.com/gradido/gradido/pull/3223) +- feat(backend): fill linked_user_gradido_id and linked_user_name for creation transactions [`#3268`](https://github.com/gradido/gradido/pull/3268) +- feat(frontend): use day for contribution dates [`#3269`](https://github.com/gradido/gradido/pull/3269) +- feat(backend): fill linked_user_id for creation transactions [`#3266`](https://github.com/gradido/gradido/pull/3266) +- docs(other): 3258 feature create gms usecase docu [`#3260`](https://github.com/gradido/gradido/pull/3260) +- fix(frontend): update moderatorChangedMemo [`#3259`](https://github.com/gradido/gradido/pull/3259) +- chore(other): change filename date-pattern and stop all modules with db-write-access [`#3245`](https://github.com/gradido/gradido/pull/3245) + #### [2.1.1](https://github.com/gradido/gradido/compare/2.0.1...2.1.1) +> 1 December 2023 + +- chore(release): v2.1.1 [`#3257`](https://github.com/gradido/gradido/pull/3257) - feat(admin): wiedervorlage v2 [`#3255`](https://github.com/gradido/gradido/pull/3255) - feat(admin): resubmission [`#3252`](https://github.com/gradido/gradido/pull/3252) - feat(backend): grant moderator right to edit contribution memo [`#3233`](https://github.com/gradido/gradido/pull/3233) diff --git a/admin/package.json b/admin/package.json index e34136e4b..a28adad43 100644 --- a/admin/package.json +++ b/admin/package.json @@ -3,7 +3,7 @@ "description": "Administraion Interface for Gradido", "main": "index.js", "author": "Moriz Wahl", - "version": "2.1.1", + "version": "2.2.0", "license": "Apache-2.0", "private": false, "scripts": { diff --git a/backend/package.json b/backend/package.json index 43b7fb87c..cdf35b725 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "gradido-backend", - "version": "2.1.1", + "version": "2.2.0", "description": "Gradido unified backend providing an API-Service for Gradido Transactions", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/backend", diff --git a/database/package.json b/database/package.json index 8e1a99826..2b31e033b 100644 --- a/database/package.json +++ b/database/package.json @@ -1,6 +1,6 @@ { "name": "gradido-database", - "version": "2.1.1", + "version": "2.2.0", "description": "Gradido Database Tool to execute database migrations", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/database", diff --git a/dht-node/package.json b/dht-node/package.json index ec47913de..7a73791d5 100644 --- a/dht-node/package.json +++ b/dht-node/package.json @@ -1,6 +1,6 @@ { "name": "gradido-dht-node", - "version": "2.1.1", + "version": "2.2.0", "description": "Gradido dht-node module", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/", diff --git a/dlt-connector/package.json b/dlt-connector/package.json index 8b5ae357c..5bc9673de 100644 --- a/dlt-connector/package.json +++ b/dlt-connector/package.json @@ -1,6 +1,6 @@ { "name": "gradido-dlt-connector", - "version": "2.1.1", + "version": "2.2.0", "description": "Gradido DLT-Connector", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/", diff --git a/federation/package.json b/federation/package.json index 1457b1be1..fcfaa0e46 100644 --- a/federation/package.json +++ b/federation/package.json @@ -1,6 +1,6 @@ { "name": "gradido-federation", - "version": "2.1.1", + "version": "2.2.0", "description": "Gradido federation module providing Gradido-Hub-Federation and versioned API for inter community communication", "main": "src/index.ts", "repository": "https://github.com/gradido/gradido/federation", diff --git a/frontend/package.json b/frontend/package.json index fb5210a05..2a3eeb56a 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "bootstrap-vue-gradido-wallet", - "version": "2.1.1", + "version": "2.2.0", "private": true, "scripts": { "start": "node run/server.js", diff --git a/package.json b/package.json index 063d7394a..b85be6f24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gradido", - "version": "2.1.1", + "version": "2.2.0", "description": "Gradido", "main": "index.js", "repository": "git@github.com:gradido/gradido.git", diff --git a/scripts/release.sh b/scripts/release.sh index ac7a748d0..caa8d517c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -38,4 +38,4 @@ yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${ # generate changelog cd ${PROJECT_DIR} -auto-changelog --commit-limit 0 --latest-version ${VERSION} \ No newline at end of file +./node_modules/.bin/auto-changelog --commit-limit 0 --latest-version ${VERSION} \ No newline at end of file From 54c8ef3431ec91838bcdd2c05786e92a2870baec Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Fri, 9 Feb 2024 15:36:57 +0100 Subject: [PATCH 3/4] require branch name also in hetzner_cloud/install.sh --- deployment/hetzner_cloud/install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deployment/hetzner_cloud/install.sh b/deployment/hetzner_cloud/install.sh index e9ed69e76..06b92ecaf 100755 --- a/deployment/hetzner_cloud/install.sh +++ b/deployment/hetzner_cloud/install.sh @@ -1,4 +1,9 @@ #!/bin/bash +# check for parameter +if [ -z "$1" ]; then + echo "Usage: Please provide a branch name as the first argument." + exit 1 +fi # Note: This is needed - since there is Summer-Time included in the default server Setup - UTC is REQUIRED for production data timedatectl set-timezone UTC From fed0e7e09cc6357a11c2132b5f8d19913ccebd3d Mon Sep 17 00:00:00 2001 From: clauspeterhuebner <86960882+clauspeterhuebner@users.noreply.github.com> Date: Fri, 9 Feb 2024 21:49:36 +0100 Subject: [PATCH 4/4] Update deployment/bare_metal/.env.dist Sorry, these lines were part of merge conflicts and not clear for me what to do... Co-authored-by: einhornimmond --- deployment/bare_metal/.env.dist | 2 -- 1 file changed, 2 deletions(-) diff --git a/deployment/bare_metal/.env.dist b/deployment/bare_metal/.env.dist index b6b158b87..f9b6b0a5d 100644 --- a/deployment/bare_metal/.env.dist +++ b/deployment/bare_metal/.env.dist @@ -120,8 +120,6 @@ NGINX_REWRITE_LEGACY_URLS=false DEFAULT_PUBLISHER_ID=2896 WEBHOOK_ELOPAGE_SECRET=secret -WALLET_AUTH_URL=https://stage1.gradido.net/authenticate?token={token} -WALLET_URL=https://stage1.gradido.net/login # GMS #GMS_ACTIVE=true