From 3ed6a4ec45c6d999674172af4c363e54e5b6bf02 Mon Sep 17 00:00:00 2001 From: ange Date: Wed, 19 Jun 2024 09:44:13 +0200 Subject: [PATCH 1/8] bump: v1.109.0 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 51a42f2..c9dcade 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.115.0 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.109.0 TURN_URL=turn.test.gmoker.com IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r12 -- 2.45.2 From e2bdccb8fa7d3b21617d84c6b1b9bc38327b1193 Mon Sep 17 00:00:00 2001 From: ange Date: Mon, 1 Jul 2024 18:35:13 +0200 Subject: [PATCH 2/8] bump: v1.110.0rc2 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index c9dcade..2da5cfd 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.109.0 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.110.0rc2 TURN_URL=turn.test.gmoker.com IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r12 -- 2.45.2 From 37dcd82f2df6bf64ec6317d02526b79d24640683 Mon Sep 17 00:00:00 2001 From: ange Date: Wed, 3 Jul 2024 18:41:45 +0200 Subject: [PATCH 3/8] bump: v1.110.0 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 2da5cfd..977f69b 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.110.0rc2 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.110.0 TURN_URL=turn.test.gmoker.com IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r12 -- 2.45.2 From f2400f214474f9174e05ecb45606391c77cb5d7a Mon Sep 17 00:00:00 2001 From: ange Date: Fri, 26 Jul 2024 10:46:08 +0700 Subject: [PATCH 4/8] bump: v1.112.0rc1 --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 977f69b..4234e05 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.110.0 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.112.0rc1 TURN_URL=turn.test.gmoker.com -IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r12 +IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r10 MAX_UPLOAD_SIZE=50M -- 2.45.2 From fc2331f9511ea228a07dbe14cbaba1da0dc392f8 Mon Sep 17 00:00:00 2001 From: ange Date: Fri, 16 Aug 2024 19:43:08 +0700 Subject: [PATCH 5/8] bump: v1.113.0 --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index 4234e05..186c818 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.112.0rc1 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.113.0 TURN_URL=turn.test.gmoker.com IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r10 -- 2.45.2 From 32fbfc761c5810019ffffe44684cc2b0f59da0e9 Mon Sep 17 00:00:00 2001 From: ange Date: Sun, 8 Sep 2024 14:45:17 +0800 Subject: [PATCH 6/8] bump: v1.114.0 --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 186c818..33478a2 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.113.0 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.114.0 TURN_URL=turn.test.gmoker.com -IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r10 +IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r11 MAX_UPLOAD_SIZE=50M -- 2.45.2 From 8dd4256576e8c4e4857d843d40a25e4ca4f2aeda Mon Sep 17 00:00:00 2001 From: ange Date: Fri, 20 Sep 2024 16:04:59 +0800 Subject: [PATCH 7/8] bump: v1.155.0 --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 33478a2..51a42f2 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.114.0 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.115.0 TURN_URL=turn.test.gmoker.com -IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r11 +IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r12 MAX_UPLOAD_SIZE=50M -- 2.45.2 From 5b894d0007319a14325ab3fa0d99330ea2d33125 Mon Sep 17 00:00:00 2001 From: ange Date: Mon, 23 Dec 2024 03:35:45 +0000 Subject: [PATCH 8/8] bump: 1.121.1 --- .env | 6 +++--- compose.yaml | 13 +++++++++---- manifests/bin/deploy.sh | 27 +++++++++++++++------------ manifests/bin/devel.sh | 1 + manifests/bin/prod.sh | 1 + 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.env b/.env index 51a42f2..ee88b05 100644 --- a/.env +++ b/.env @@ -1,8 +1,8 @@ PROD_URL=matrix.gmoker.com SERVER_NAME=gmoker.com -IMAGEAPP=ghcr.io/element-hq/synapse:v1.115.0 +IMAGEAPP=ghcr.io/element-hq/synapse:v1.121.1 -TURN_URL=turn.test.gmoker.com -IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r12 +#TURN_URL=turn.test.gmoker.com +#IMAGECOTURN=docker.io/coturn/coturn:4.6.2-r12 MAX_UPLOAD_SIZE=50M diff --git a/compose.yaml b/compose.yaml index c7e182c..71a3b09 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,12 +1,12 @@ --- services: db: - image: docker.io/postgres:15 + image: docker.io/postgres:17 restart: unless-stopped environment: - - POSTGRES_DB - - POSTGRES_USER - - POSTGRES_PASSWORD + - POSTGRES_DB=db + - POSTGRES_USER=db + - POSTGRES_PASSWORD=db volumes: - db:/var/lib/postgresql/data/ @@ -16,6 +16,11 @@ services: ports: - "8080:8008" - "8448:8448" + environment: + - POSTGRES_HOST=db + - POSTGRES_DB=db + - POSTGRES_USER=db + - POSTGRES_PASSWORD=db volumes: - synapse_config:/config/ - synapse_data:/data/ diff --git a/manifests/bin/deploy.sh b/manifests/bin/deploy.sh index cd0fe42..2e8c599 100755 --- a/manifests/bin/deploy.sh +++ b/manifests/bin/deploy.sh @@ -3,32 +3,35 @@ set -o pipefail function kapply() { for f in "$@"; do - kubectl apply -f \ - <(envsubst "$(env | xargs printf '$%s ')" < "manifests/$f") + kubectl apply -f <(envsubst < "manifests/$f") done -} +}; export -f kapply function kcreatesec() { - kubectl create secret generic --save-config --dry-run=client -oyaml "$@" | kubectl apply -f- -} + kubectl create secret generic --dry-run=client -oyaml "$@" | kubectl replace -f- +}; export -f kcreatesec function kcreatecm() { - kubectl create configmap --dry-run=client -oyaml "$@" | kubectl apply -f- -} + kubectl create configmap --dry-run=client -oyaml "$@" | kubectl replace -f- +}; export -f kcreatecm function kgseckey() { local sec="$1"; shift local key="$1"; shift - kubectl get secret "$sec" -o jsonpath="{.data.$key}" | base64 -d -} + if ! kubectl get secret "$sec" -ojson | jq -re ".data.\"$key\" // empty" | base64 -d; then + return 1 + fi +}; export -f kgseckey function kgcmkey() { - local cm="$1"; shift + local cm="$1"; shift local key="$1"; shift - kubectl get configmap "$cm" -o jsonpath="{.data.$key}" -} + if ! kubectl get configmap "$cm" -ojson | jq -re ".data.\"$key\" // empty"; then + return 1 + fi +}; export -f kgcmkey function get_synapse_key() { kgcmkey synapse 'homeserver\.yaml' | awk -F\" "/^\s*$1/{print \$2}" || openssl rand -hex 32 diff --git a/manifests/bin/devel.sh b/manifests/bin/devel.sh index 464c4d0..65675aa 100755 --- a/manifests/bin/devel.sh +++ b/manifests/bin/devel.sh @@ -1,4 +1,5 @@ #!/bin/bash -e +set -o pipefail export NB_REPLICAS=1 diff --git a/manifests/bin/prod.sh b/manifests/bin/prod.sh index 018bd3b..f70a7f1 100755 --- a/manifests/bin/prod.sh +++ b/manifests/bin/prod.sh @@ -1,4 +1,5 @@ #!/bin/bash -e +set -o pipefail # TODO: 3 export NB_REPLICAS=1 -- 2.45.2