Compare commits

..

8 Commits
devel ... prod

Author SHA1 Message Date
cdd66c8757 bump: v1.115.0 (#1)
Some checks failed
/ deploy (push) Failing after 6s
Reviewed-on: #1
2024-09-27 00:41:05 +00:00
05474d5046 feat: MAX_UPLOAD_SIZE 2024-09-27 00:41:05 +00:00
4b0445befe fix: SERVER_NAME only for prod 2024-09-27 00:41:05 +00:00
0f3784217c fix: !staging.sh + if in prod.sh 2024-09-27 00:41:05 +00:00
ea51dace79 feat: separate staging/prod binaries 2024-09-27 00:41:05 +00:00
fd73485fa5 fix: delegation prod-only 2024-09-27 00:41:05 +00:00
6801eff85d fix: config path 2024-09-27 00:41:05 +00:00
8e94b3d942 feat: rename cm synapse-config -> synapse 2024-09-27 00:41:05 +00:00
5 changed files with 26 additions and 36 deletions

6
.env
View File

@ -1,8 +1,8 @@
PROD_URL=matrix.gmoker.com
SERVER_NAME=gmoker.com
IMAGEAPP=ghcr.io/element-hq/synapse:v1.121.1
IMAGEAPP=ghcr.io/element-hq/synapse:v1.115.0
#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

View File

@ -1,12 +1,12 @@
---
services:
db:
image: docker.io/postgres:17
image: docker.io/postgres:15
restart: unless-stopped
environment:
- POSTGRES_DB=db
- POSTGRES_USER=db
- POSTGRES_PASSWORD=db
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
volumes:
- db:/var/lib/postgresql/data/
@ -16,11 +16,6 @@ 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/

View File

@ -1,40 +1,37 @@
#!/bin/bash
set -xeo pipefail
#!/bin/bash -e
set -o pipefail
function kapply() {
for f in "$@"; do
kubectl apply -f <(envsubst < "manifests/$f")
kubectl apply -f \
<(envsubst "$(env | xargs printf '$%s ')" < "manifests/$f")
done
}; export -f kapply
}
function kcreatesec() {
kubectl create secret generic --dry-run=client -oyaml "$@" | kubectl replace -f-
}; export -f kcreatesec
kubectl create secret generic --save-config --dry-run=client -oyaml "$@" | kubectl apply -f-
}
function kcreatecm() {
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl replace -f-
}; export -f kcreatecm
kubectl create configmap --dry-run=client -oyaml "$@" | kubectl apply -f-
}
function kgseckey() {
local sec="$1"; shift
local key="$1"; shift
if ! kubectl get secret "$sec" -ojson | jq -re ".data.\"$key\" // empty" | base64 -d; then
return 1
fi
}; export -f kgseckey
kubectl get secret "$sec" -o jsonpath="{.data.$key}" | base64 -d
}
function kgcmkey() {
local cm="$1"; shift
local cm="$1"; shift
local key="$1"; shift
if ! kubectl get configmap "$cm" -ojson | jq -re ".data.\"$key\" // empty"; then
return 1
fi
}; export -f kgcmkey
kubectl get configmap "$cm" -o jsonpath="{.data.$key}"
}
function get_synapse_key() {
kgcmkey synapse homeserver.yaml | awk -F\" "/^\s*$1/{print \$2}" || openssl rand -hex 32
kgcmkey synapse 'homeserver\.yaml' | awk -F\" "/^\s*$1/{print \$2}" || openssl rand -hex 32
}
@ -51,8 +48,8 @@ export TURN_SHARED_SECRET; TURN_SHARED_SECRET="$(get_synapse_key turn_shared_s
export REGISTRATION_SECRET; REGISTRATION_SECRET="$(get_synapse_key registration_shared_secret)"
kcreatecm synapse \
--from-file=homeserver.yaml=<(envsubst < config/homeserver.yaml) \
--from-file=log.config=<(envsubst < config/log.config)
--from-file=homeserver.yaml=<(envsubst "$(env | xargs printf '$%s ')" < config/homeserver.yaml) \
--from-file=log.config=<(envsubst "$(env | xargs printf '$%s ')" < config/log.config)
kapply common/keys.yaml common/app.yaml

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -eo pipefail
#!/bin/bash -e
export NB_REPLICAS=1

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -eo pipefail
#!/bin/bash -e
# TODO: 3
export NB_REPLICAS=1