From 80209385e8c40338fa7dc940048a98cce1255813 Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Sun, 3 Nov 2024 00:50:33 -0500 Subject: [PATCH] use custom replication solution Signed-off-by: eternal-flame-AD --- compose_example.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/compose_example.yml b/compose_example.yml index 12554b04fd..7701ff2ec5 100644 --- a/compose_example.yml +++ b/compose_example.yml @@ -76,22 +76,40 @@ services: retries: 20 command: ["-c", "wal_level=logical"] - db-publish: + replikey: restart: always - image: alpine/socat + image: l1drm/replikey:latest + profiles: [replikey-master] user: "${MISSKEY_UID}:${MISSKEY_GID}" links: - db + - redis networks: - internal_network - external_network ports: - - "5433:5433" + - "5443:5443" volumes: - - ./replication:/data + - ./replikey:/etc/replikey:ro command: [ - "OPENSSL-LISTEN:5433,openssl-min-proto-version=TLS1.2,cert=/data/certs/server.pub.pem,key=/data/certs/server.key.pem,cafile=/data/certs/ca.pem,fork,reuseaddr", - "TCP4:db:5432" + "network", + "reverse-proxy", + "--listen", + "0.0.0.0:5443", + "--cert", + "/etc/replikey/cert.pem", + "--key", + "/etc/replikey/key.pem", + "--ca", + "/etc/replikey/ca.pem", + "--redis-sni", + "${MTLS_REDIS_SNI}", + "--redis-target", + "redis:6379", + "--postgres-sni", + "${MTLS_POSTGRES_SNI}", + "--postgres-target", + "db:5432", ] # mcaptcha: