Compare commits

..

18 Commits
prod ... devel

Author SHA1 Message Date
de9de2716a
debug
Some checks failed
/ deploy (push) Failing after 5s
2024-12-28 13:16:09 +00:00
c8543f2ce7
fix: kgcmkey quotes error
Some checks failed
/ deploy (push) Failing after 5s
2024-12-28 13:02:43 +00:00
5b894d0007
bump: 1.121.1
All checks were successful
/ deploy (push) Successful in 6s
2024-12-23 03:35:45 +00:00
8dd4256576
bump: v1.155.0
All checks were successful
/ deploy (push) Successful in 5s
2024-09-27 07:43:03 +07:00
32fbfc761c
bump: v1.114.0 2024-09-27 07:43:02 +07:00
fc2331f951
bump: v1.113.0 2024-09-27 07:43:02 +07:00
f2400f2144
bump: v1.112.0rc1 2024-09-27 07:43:02 +07:00
37dcd82f2d
bump: v1.110.0 2024-09-27 07:43:02 +07:00
e2bdccb8fa
bump: v1.110.0rc2 2024-09-27 07:43:02 +07:00
3ed6a4ec45
bump: v1.109.0 2024-09-27 07:43:02 +07:00
298901b14a
bump: v1.115.0 (#1)
All checks were successful
/ deploy (push) Successful in 6s
Reviewed-on: #1
2024-09-27 07:42:17 +07:00
f74286c0e2
feat: MAX_UPLOAD_SIZE 2024-09-27 07:42:17 +07:00
3017d80d8a
fix: SERVER_NAME only for prod 2024-09-27 07:42:17 +07:00
1abe0f8d37
fix: !staging.sh + if in prod.sh 2024-09-27 07:42:17 +07:00
b78d74390b
feat: separate staging/prod binaries 2024-09-27 07:42:17 +07:00
abb225d362
fix: delegation prod-only 2024-09-27 07:42:17 +07:00
2f4e00a44e
fix: config path 2024-09-27 07:42:16 +07:00
1212109d47
feat: rename cm synapse-config -> synapse 2024-09-27 07:42:16 +07:00
5 changed files with 36 additions and 26 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.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

View File

@ -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/

View File

@ -1,37 +1,40 @@
#!/bin/bash -e
set -o pipefail
#!/bin/bash
set -xeo 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
kgcmkey synapse homeserver.yaml | awk -F\" "/^\s*$1/{print \$2}" || openssl rand -hex 32
}
@ -48,8 +51,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 "$(env | xargs printf '$%s ')" < config/homeserver.yaml) \
--from-file=log.config=<(envsubst "$(env | xargs printf '$%s ')" < config/log.config)
--from-file=homeserver.yaml=<(envsubst < config/homeserver.yaml) \
--from-file=log.config=<(envsubst < config/log.config)
kapply common/keys.yaml common/app.yaml

View File

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

View File

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