diff --git a/backend/src/federation/client/1_0/FederationClient.ts b/backend/src/federation/client/1_0/FederationClient.ts index d4ed5960b..1e676a1a7 100644 --- a/backend/src/federation/client/1_0/FederationClient.ts +++ b/backend/src/federation/client/1_0/FederationClient.ts @@ -21,9 +21,13 @@ export async function requestGetPublicKey(dbCom: DbCommunity): Promise instance.url === url) + if (instance) { + return instance.client } - - return GraphQLGetClient.instance + const client = new GraphQLGetClient(url, { + method: 'GET', + jsonSerializer: { + parse: JSON.parse, + stringify: JSON.stringify, + }, + }) + GraphQLGetClient.instanceArray.push({ url, client } as ClientInstance) + return client } } diff --git a/backend/src/federation/validateCommunities.ts b/backend/src/federation/validateCommunities.ts index 157d83bb5..dfd46a3e9 100644 --- a/backend/src/federation/validateCommunities.ts +++ b/backend/src/federation/validateCommunities.ts @@ -42,17 +42,18 @@ export async function validateCommunities(): Promise { pubKey, `${dbCom.endPoint}/${dbCom.apiVersion}`, ) - if (pubKey && pubKey === dbCom.publicKey.toString('hex')) { + if (pubKey && pubKey === dbCom.publicKey.toString()) { logger.info(`Federation: matching publicKey: ${pubKey}`) await DbCommunity.update({ id: dbCom.id }, { verifiedAt: new Date() }) logger.debug(`Federation: updated dbCom: ${JSON.stringify(dbCom)}`) + } else { + logger.warn( + `Federation: received not matching publicKey -> received: ${ + pubKey || 'null' + }, expected: ${dbCom.publicKey.toString()} `, + ) + // DbCommunity.delete({ id: dbCom.id }) } - /* - else { - logger.warn(`Federation: received unknown publicKey -> delete dbCom with id=${dbCom.id} `) - DbCommunity.delete({ id: dbCom.id }) - } - */ } catch (err) { if (!isLogError(err)) { logger.error(`Error:`, err) diff --git a/deployment/bare_metal/.env.dist b/deployment/bare_metal/.env.dist index b19bd8855..da745d705 100644 --- a/deployment/bare_metal/.env.dist +++ b/deployment/bare_metal/.env.dist @@ -65,7 +65,9 @@ FEDERATION_COMMUNITY_URL=http://stage1.gradido.net # the api port is the baseport, which will be added with the api-version, e.g. 1_0 = 5010 FEDERATION_COMMUNITY_API_PORT=5000 - +FEDERATION_CONFIG_VERSION=v1.2023-01-09 +# comma separated list of api-versions, which cause starting several federation modules +FEDERATION_COMMUNITY_APIS=1_0,1_1,2_0 # database DATABASE_CONFIG_VERSION=v1.2022-03-18 diff --git a/deployment/bare_metal/nginx/sites-available/gradido-federation.conf.template b/deployment/bare_metal/nginx/sites-available/gradido-federation.conf.template new file mode 100644 index 000000000..2192b7dbb --- /dev/null +++ b/deployment/bare_metal/nginx/sites-available/gradido-federation.conf.template @@ -0,0 +1,15 @@ + + location /api/$FEDERATION_APIVERSION { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:$FEDERATION_PORT; + proxy_redirect off; + + access_log $GRADIDO_LOG_PATH/nginx-access.federation-$FEDERATION_PORT.log gradido_log; + error_log $GRADIDO_LOG_PATH/nginx-error.federation-$FEDERATION_PORT.log warn; + } diff --git a/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template b/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template index aade0429b..ddb0724b0 100644 --- a/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf.ssl.template @@ -42,19 +42,19 @@ server { # Frontend (default) location / { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:3000; + proxy_redirect off; access_log $GRADIDO_LOG_PATH/nginx-access.frontend.log gradido_log; error_log $GRADIDO_LOG_PATH/nginx-error.frontend.log warn; - } + } # Backend location /graphql { @@ -112,6 +112,9 @@ server { error_log $GRADIDO_LOG_PATH/nginx-error.admin.log warn; } + # Federation + $FEDERATION_NGINX_CONF + # TODO this could be a performance optimization #location /vue { # alias /var/www/html/gradido/frontend/dist; diff --git a/deployment/bare_metal/nginx/sites-available/gradido.conf.template b/deployment/bare_metal/nginx/sites-available/gradido.conf.template index b4c7b3463..42a5a1851 100644 --- a/deployment/bare_metal/nginx/sites-available/gradido.conf.template +++ b/deployment/bare_metal/nginx/sites-available/gradido.conf.template @@ -27,19 +27,19 @@ server { # Frontend (default) location / { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $host; - - proxy_pass http://127.0.0.1:3000; - proxy_redirect off; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + + proxy_pass http://127.0.0.1:3000; + proxy_redirect off; access_log $GRADIDO_LOG_PATH/nginx-access.frontend.log gradido_log; error_log $GRADIDO_LOG_PATH/nginx-error.frontend.log warn; - } + } # Backend location /graphql { @@ -98,6 +98,9 @@ server { error_log $GRADIDO_LOG_PATH/nginx-error.admin.log warn; } + # Federation + $FEDERATION_NGINX_CONF + # TODO this could be a performance optimization #location /vue { # alias /var/www/html/gradido/frontend/dist; diff --git a/deployment/bare_metal/start.sh b/deployment/bare_metal/start.sh index 89dc9d2f0..6c3c07766 100755 --- a/deployment/bare_metal/start.sh +++ b/deployment/bare_metal/start.sh @@ -59,8 +59,9 @@ ln -s /etc/nginx/sites-available/update-page.conf /etc/nginx/sites-enabled/ sudo /etc/init.d/nginx restart # stop all services -echo 'Stopping all Gradido services' >> $UPDATE_HTML -pm2 stop all +echo 'Stop and delete all Gradido services' >> $UPDATE_HTML +pm2 delete all +pm2 save # git BRANCH=${1:-master} @@ -73,12 +74,41 @@ git pull export BUILD_COMMIT="$(git rev-parse HEAD)" # Generate gradido.conf from template +# *** 1st prepare for each apiversion the federation conf for nginx from federation-template +# *** set FEDERATION_PORT from FEDERATION_COMMUNITY_APIS and create gradido-federation.conf file +rm -f $NGINX_CONFIG_DIR/gradido.conf.tmp +rm -f $NGINX_CONFIG_DIR/gradido-federation.conf.locations +echo "====================================================================================================" >> $UPDATE_HTML +IFS="," read -a API_ARRAY <<< $FEDERATION_COMMUNITY_APIS +for api in "${API_ARRAY[@]}" +do + export FEDERATION_APIVERSION=$api + # calculate port by remove '_' and add value of api to baseport + port=${api//_/} + FEDERATION_PORT=${FEDERATION_COMMUNITY_API_PORT:-5000} + FEDERATION_PORT=$(($FEDERATION_PORT + $port)) + export FEDERATION_PORT + echo "create ngingx config: location /api/$FEDERATION_APIVERSION to http://127.0.0.1:$FEDERATION_PORT" >> $UPDATE_HTML + envsubst '$FEDERATION_APIVERSION, $FEDERATION_PORT' < $NGINX_CONFIG_DIR/gradido-federation.conf.template >> $NGINX_CONFIG_DIR/gradido-federation.conf.locations +done +unset FEDERATION_APIVERSION +unset FEDERATION_PORT +echo "====================================================================================================" >> $UPDATE_HTML + +# *** 2nd read gradido-federation.conf file in env variable to be replaced in 3rd step +export FEDERATION_NGINX_CONF=$(< $NGINX_CONFIG_DIR/gradido-federation.conf.locations) + +# *** 3rd generate gradido nginx config including federation modules per api-version echo 'Generate new gradido nginx config' >> $UPDATE_HTML case "$NGINX_SSL" in true) TEMPLATE_FILE="gradido.conf.ssl.template" ;; *) TEMPLATE_FILE="gradido.conf.template" ;; esac -envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/$TEMPLATE_FILE > $NGINX_CONFIG_DIR/gradido.conf +envsubst '$FEDERATION_NGINX_CONF' < $NGINX_CONFIG_DIR/$TEMPLATE_FILE > $NGINX_CONFIG_DIR/gradido.conf.tmp +unset FEDERATION_NGINX_CONF +envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/gradido.conf.tmp > $NGINX_CONFIG_DIR/gradido.conf +rm $NGINX_CONFIG_DIR/gradido.conf.tmp +rm $NGINX_CONFIG_DIR/gradido-federation.conf.locations # Generate update-page.conf from template echo 'Generate new update-page nginx config' >> $UPDATE_HTML @@ -94,11 +124,13 @@ cp -f $PROJECT_ROOT/backend/.env $PROJECT_ROOT/backend/.env.bak cp -f $PROJECT_ROOT/frontend/.env $PROJECT_ROOT/frontend/.env.bak cp -f $PROJECT_ROOT/admin/.env $PROJECT_ROOT/admin/.env.bak cp -f $PROJECT_ROOT/dht-node/.env $PROJECT_ROOT/dht-node/.env.bak +cp -f $PROJECT_ROOT/federation/.env $PROJECT_ROOT/federation/.env.bak envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/database/.env.template > $PROJECT_ROOT/database/.env envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/backend/.env.template > $PROJECT_ROOT/backend/.env envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/frontend/.env.template > $PROJECT_ROOT/frontend/.env envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/admin/.env.template > $PROJECT_ROOT/admin/.env envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/dht-node/.env.template > $PROJECT_ROOT/dht-node/.env +envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $PROJECT_ROOT/federation/.env.template > $PROJECT_ROOT/federation/.env # Install & build database echo 'Updating database' >> $UPDATE_HTML @@ -124,7 +156,6 @@ if [ "$DEPLOY_SEED_DATA" = "true" ]; then fi # TODO maybe handle this differently? export NODE_ENV=production -pm2 delete gradido-backend pm2 start --name gradido-backend "yarn --cwd $PROJECT_ROOT/backend start" -l $GRADIDO_LOG_PATH/pm2.backend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' pm2 save @@ -137,7 +168,6 @@ yarn install yarn build # TODO maybe handle this differently? export NODE_ENV=production -pm2 delete gradido-frontend pm2 start --name gradido-frontend "yarn --cwd $PROJECT_ROOT/frontend start" -l $GRADIDO_LOG_PATH/pm2.frontend.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' pm2 save @@ -150,7 +180,6 @@ yarn install yarn build # TODO maybe handle this differently? export NODE_ENV=production -pm2 delete gradido-admin pm2 start --name gradido-admin "yarn --cwd $PROJECT_ROOT/admin start" -l $GRADIDO_LOG_PATH/pm2.admin.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' pm2 save @@ -163,15 +192,49 @@ yarn install yarn build # TODO maybe handle this differently? export NODE_ENV=production -pm2 delete gradido-dht-node if [ ! -z $FEDERATION_DHT_TOPIC ]; then pm2 start --name gradido-dht-node "yarn --cwd $PROJECT_ROOT/dht-node start" -l $GRADIDO_LOG_PATH/pm2.dht-node.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' + pm2 save else - echo "=====================================================================" - echo "WARNING: FEDERATION_DHT_TOPIC not configured. DHT-Node not started..." - echo "=====================================================================" + echo "=====================================================================" >> $UPDATE_HTML + echo "WARNING: FEDERATION_DHT_TOPIC not configured. DHT-Node not started..." >> $UPDATE_HTML + echo "=====================================================================" >> $UPDATE_HTML fi -pm2 save + + +# Install & build federation +echo 'Updating federation' >> $UPDATE_HTML +cd $PROJECT_ROOT/federation +# TODO maybe handle this differently? +unset NODE_ENV +yarn install +yarn build +# TODO maybe handle this differently? +export NODE_ENV=production + +# set FEDERATION_PORT from FEDERATION_COMMUNITY_APIS +IFS="," read -a API_ARRAY <<< $FEDERATION_COMMUNITY_APIS +for api in "${API_ARRAY[@]}" +do + export FEDERATION_API=$api + echo "FEDERATION_API=$FEDERATION_API" >> $UPDATE_HTML + export MODULENAME=gradido-federation-$api + echo "MODULENAME=$MODULENAME" >> $UPDATE_HTML + # calculate port by remove '_' and add value of api to baseport + port=${api//_/} + FEDERATION_PORT=${FEDERATION_COMMUNITY_API_PORT:-5000} + FEDERATION_PORT=$(($FEDERATION_PORT + $port)) + export FEDERATION_PORT + echo "====================================================" >> $UPDATE_HTML + echo " start $MODULENAME listening on port=$FEDERATION_PORT" >> $UPDATE_HTML + echo "====================================================" >> $UPDATE_HTML +# pm2 delete $MODULENAME + pm2 start --name $MODULENAME "yarn --cwd $PROJECT_ROOT/federation start" -l $GRADIDO_LOG_PATH/pm2.$MODULENAME.$TODAY.log --log-date-format 'YYYY-MM-DD HH:mm:ss.SSS' + pm2 save +done + + + # let nginx showing gradido echo 'Configuring nginx to serve gradido again' >> $UPDATE_HTML diff --git a/dht-node/src/dht_node/index.test.ts b/dht-node/src/dht_node/index.test.ts index b7e36c783..ac5b1b21a 100644 --- a/dht-node/src/dht_node/index.test.ts +++ b/dht-node/src/dht_node/index.test.ts @@ -719,11 +719,11 @@ describe('federation', () => { JSON.stringify([ { api: '1_0', - url: 'http://localhost:5001/api/', + url: 'http://localhost/api/', }, { api: '2_0', - url: 'http://localhost:5002/api/', + url: 'http://localhost/api/', }, ]), ), @@ -747,7 +747,7 @@ describe('federation', () => { foreign: true, publicKey: expect.any(Buffer), apiVersion: '1_0', - endPoint: 'http://localhost:5001/api/', + endPoint: 'http://localhost/api/', lastAnnouncedAt: expect.any(Date), createdAt: expect.any(Date), updatedAt: null, @@ -764,7 +764,7 @@ describe('federation', () => { foreign: true, publicKey: expect.any(Buffer), apiVersion: '2_0', - endPoint: 'http://localhost:5002/api/', + endPoint: 'http://localhost/api/', lastAnnouncedAt: expect.any(Date), createdAt: expect.any(Date), updatedAt: null, @@ -786,15 +786,15 @@ describe('federation', () => { JSON.stringify([ { api: '1_0', - url: 'http://localhost:5001/api/', + url: 'http://localhost/api/', }, { api: '1_1', - url: 'http://localhost:5002/api/', + url: 'http://localhost/api/', }, { api: '2_0', - url: 'http://localhost:5003/api/', + url: 'http://localhost/api/', }, ]), ), diff --git a/dht-node/src/dht_node/index.ts b/dht-node/src/dht_node/index.ts index 722a62af7..d101037ae 100644 --- a/dht-node/src/dht_node/index.ts +++ b/dht-node/src/dht_node/index.ts @@ -181,11 +181,9 @@ export const startDHT = async (topic: string): Promise => { async function writeHomeCommunityEnries(pubKey: any): Promise { const homeApiVersions: CommunityApi[] = Object.values(ApiVersionType).map(function (apiEnum) { - const port = - Number.parseInt(CONFIG.FEDERATION_COMMUNITY_API_PORT) + Number(apiEnum.replace('_', '')) const comApi: CommunityApi = { api: apiEnum, - url: CONFIG.FEDERATION_COMMUNITY_URL + ':' + port.toString() + '/api/', + url: CONFIG.FEDERATION_COMMUNITY_URL + '/api/', } return comApi }) diff --git a/federation/.env.dist b/federation/.env.dist new file mode 100644 index 000000000..42b3d05bf --- /dev/null +++ b/federation/.env.dist @@ -0,0 +1,11 @@ +# Database +DB_HOST=localhost +DB_PORT=3306 +DB_DATABASE=gradido_community +DB_USER=root +DB_PASSWORD= + +# Federation +FEDERATION_API=1_0 +FEDERATION_PORT=5010 +FEDERATION_COMMUNITY_URL=http://localhost diff --git a/federation/.env.template b/federation/.env.template new file mode 100644 index 000000000..af6e8f627 --- /dev/null +++ b/federation/.env.template @@ -0,0 +1,16 @@ +CONFIG_VERSION=$FEDERATION_CONFIG_VERSION + +LOG_LEVEL=$LOG_LEVEL +# this is set fix to false, because it is important for 'production' environments. only set to true if a graphql-playground should be in use +GRAPHIQL=false + +# Database +DB_HOST=$DB_HOST +DB_PORT=$DB_PORT +DB_DATABASE=$DB_DATABASE +DB_USER=$DB_USER +DB_PASSWORD=$DB_PASSWORD + +# Federation +FEDERATION_COMMUNITY_URL=$FEDERATION_COMMUNITY_URL + diff --git a/federation/src/config/index.ts b/federation/src/config/index.ts index 52c73ef0a..f792448d0 100644 --- a/federation/src/config/index.ts +++ b/federation/src/config/index.ts @@ -24,7 +24,6 @@ const constants = { } const server = { - PORT: process.env.PORT || 5010, // JWT_SECRET: process.env.JWT_SECRET || 'secret123', // JWT_EXPIRES_IN: process.env.JWT_EXPIRES_IN || '10m', GRAPHIQL: process.env.GRAPHIQL === 'true' || false, @@ -40,21 +39,6 @@ const database = { TYPEORM_LOGGING_RELATIVE_PATH: process.env.TYPEORM_LOGGING_RELATIVE_PATH || 'typeorm.backend.log', } -/* -const community = { - COMMUNITY_NAME: process.env.COMMUNITY_NAME || 'Gradido Entwicklung', - COMMUNITY_URL: process.env.COMMUNITY_URL || 'http://localhost/', - COMMUNITY_REGISTER_URL: process.env.COMMUNITY_REGISTER_URL || 'http://localhost/register', - COMMUNITY_REDEEM_URL: process.env.COMMUNITY_REDEEM_URL || 'http://localhost/redeem/{code}', - COMMUNITY_REDEEM_CONTRIBUTION_URL: - process.env.COMMUNITY_REDEEM_CONTRIBUTION_URL || 'http://localhost/redeem/CL-{code}', - COMMUNITY_DESCRIPTION: - process.env.COMMUNITY_DESCRIPTION || 'Die lokale Entwicklungsumgebung von Gradido.', -} -*/ - -// This is needed by graphql-directive-auth -// process.env.APP_SECRET = server.JWT_SECRET // Check config version constants.CONFIG_VERSION.CURRENT = @@ -71,10 +55,8 @@ if ( } const federation = { - // FEDERATION_DHT_TOPIC: process.env.FEDERATION_DHT_TOPIC || null, - // FEDERATION_DHT_SEED: process.env.FEDERATION_DHT_SEED || null, - FEDERATION_PORT: process.env.FEDERATION_PORT || 5010, FEDERATION_API: process.env.FEDERATION_API || '1_0', + FEDERATION_PORT: process.env.FEDERATION_PORT || 5010, FEDERATION_COMMUNITY_URL: process.env.FEDERATION_COMMUNITY_URL || null, } diff --git a/federation/src/graphql/api/1_0/model/GetPublicKeyResult.ts b/federation/src/graphql/api/1_0/model/GetPublicKeyResult.ts new file mode 100644 index 000000000..696c96cfe --- /dev/null +++ b/federation/src/graphql/api/1_0/model/GetPublicKeyResult.ts @@ -0,0 +1,13 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import { Field, ObjectType } from 'type-graphql' + +@ObjectType() +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export class GetPublicKeyResult { + constructor(pubKey: string) { + this.publicKey = pubKey + } + + @Field(() => String) + publicKey: string +} diff --git a/federation/src/graphql/api/1_0/resolver/PublicKeyResolver.ts b/federation/src/graphql/api/1_0/resolver/PublicKeyResolver.ts new file mode 100644 index 000000000..2e21af945 --- /dev/null +++ b/federation/src/graphql/api/1_0/resolver/PublicKeyResolver.ts @@ -0,0 +1,20 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import { Query, Resolver } from 'type-graphql' +import { federationLogger as logger } from '@/server/logger' +import { Community as DbCommunity } from '@entity/Community' +import { GetPublicKeyResult } from '../model/GetPublicKeyResult' + +@Resolver() +// eslint-disable-next-line @typescript-eslint/no-unused-vars +export class PublicKeyResolver { + @Query(() => GetPublicKeyResult) + async getPublicKey(): Promise { + logger.info(`getPublicKey()...`) + const homeCom = await DbCommunity.findOneOrFail({ + foreign: false, + apiVersion: '1_0', + }) + logger.info(`getPublicKey()... with publicKey=${homeCom.publicKey}`) + return new GetPublicKeyResult(homeCom.publicKey.toString()) + } +} diff --git a/federation/src/index.ts b/federation/src/index.ts index 9096cb260..71c7545aa 100644 --- a/federation/src/index.ts +++ b/federation/src/index.ts @@ -20,7 +20,7 @@ async function main() { if (CONFIG.GRAPHIQL) { // eslint-disable-next-line no-console console.log( - `GraphIQL available at http://localhost:${CONFIG.FEDERATION_PORT}` + `GraphIQL available at ${CONFIG.FEDERATION_COMMUNITY_URL}/api/${CONFIG.FEDERATION_API}` ) } }) diff --git a/scripts/release.sh b/scripts/release.sh index 80a54d949..df6ece9b6 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -7,6 +7,8 @@ FRONTEND_DIR="${PROJECT_DIR}/frontend/" BACKEND_DIR="${PROJECT_DIR}/backend/" DATABASE_DIR="${PROJECT_DIR}/database/" ADMIN_DIR="${PROJECT_DIR}/admin/" +DHTNODE_DIR="${PROJECT_DIR}/dht-node/" +FEDERATION_DIR="${PROJECT_DIR}/federation/" # navigate to project directory cd ${PROJECT_DIR} @@ -26,6 +28,10 @@ cd ${DATABASE_DIR} yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} cd ${ADMIN_DIR} yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} +cd ${DHTNODE_DIR} +yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} +cd ${FEDERATION_DIR} +yarn version --no-git-tag-version --no-commit-hooks --no-commit --new-version ${VERSION} # generate changelog cd ${PROJECT_DIR}