mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove old/existing federation processes from pm2-list before start new
ones
This commit is contained in:
parent
e32c299841
commit
1394578a5c
@ -66,6 +66,7 @@ FEDERATION_COMMUNITY_URL=http://stage1.gradido.net
|
||||
FEDERATION_COMMUNITY_API_PORT=5000
|
||||
|
||||
FEDERATION_CONFIG_VERSION=v1.2023-01-09
|
||||
# comma separated list of api-versions, which cause starting several federation moduls
|
||||
FEDERATION_COMMUNITY_APIS=1_0,1_1,2_0
|
||||
|
||||
# database
|
||||
|
||||
@ -185,6 +185,15 @@ yarn install
|
||||
yarn build
|
||||
# TODO maybe handle this differently?
|
||||
export NODE_ENV=production
|
||||
# first remove previous pm2 gradido-federation processes from list
|
||||
IFS="+--- " read -a PROCESS_ARRAY <<< pm2 ls -m | grep "+--- gradido-federation"
|
||||
for proc in "${PROCESS_ARRAY[@]}"
|
||||
do
|
||||
echo "delete process $proc"
|
||||
pm2 delete $proc
|
||||
done
|
||||
pm2 save
|
||||
|
||||
# set FEDERATION_PORT from FEDERATION_COMMUNITY_APIS
|
||||
IFS="," read -a API_ARRAY <<< $FEDERATION_COMMUNITY_APIS
|
||||
for api in "${API_ARRAY[@]}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user