Compare commits

...

6 commits

Author SHA1 Message Date
6bd7a8ae63
revert set wal_level flag
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-06 02:54:47 -06:00
a59688fab4
add slave profile
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-03 01:36:32 -05:00
44152f876d
revert migration
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-03 00:57:57 -05:00
80209385e8
use custom replication solution
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-03 00:50:33 -05:00
93a9ba8159
consistent ownership
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-01 18:45:19 -05:00
fe58cef568
draft logical replicate
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-01 04:27:57 -05:00
2 changed files with 123 additions and 1 deletions

View file

@ -27,6 +27,18 @@ services:
interval: 5s interval: 5s
retries: 20 retries: 20
# db-publish:
# restart: always
# image: alpine/socat
# ports:
# - "5433:5433"
# volumes:
# - ./replication:/data
# 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"
# ]
# meilisearch: # meilisearch:
# restart: always # restart: always
# image: getmeili/meilisearch:v1.3.4 # image: getmeili/meilisearch:v1.3.4

View file

@ -2,6 +2,8 @@ services:
nyuukyou: nyuukyou:
build: yume-mods/nyuukyou build: yume-mods/nyuukyou
restart: always restart: always
user: "${MISSKEY_UID}:${MISSKEY_GID}"
profiles: [web]
links: links:
- web - web
depends_on: depends_on:
@ -16,8 +18,14 @@ services:
- ./nyuukyou:/store - ./nyuukyou:/store
web: web:
build: . build:
context: .
args:
- UID: "${MISSKEY_UID}"
- GID: "${MISSKEY_GID}"
profiles: [web]
restart: always restart: always
user: "${MISSKEY_UID}:${MISSKEY_GID}"
links: links:
- db - db
- redis - redis
@ -42,6 +50,7 @@ services:
redis: redis:
restart: always restart: always
image: redis:7-alpine image: redis:7-alpine
user: "${MISSKEY_UID}:${MISSKEY_GID}"
networks: networks:
- internal_network - internal_network
volumes: volumes:
@ -54,6 +63,7 @@ services:
db: db:
restart: always restart: always
image: postgres:15-alpine image: postgres:15-alpine
user: "${MISSKEY_UID}:${MISSKEY_GID}"
networks: networks:
- internal_network - internal_network
env_file: env_file:
@ -65,6 +75,106 @@ services:
interval: 5s interval: 5s
retries: 20 retries: 20
replikey:
restart: always
image: l1drm/replikey:latest
profiles: [replikey-master]
user: "${MISSKEY_UID}:${MISSKEY_GID}"
links:
- db
- redis
networks:
- internal_network
- external_network
ports:
- "5443:5443"
volumes:
- ./replikey:/etc/replikey:ro
command: [
"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",
]
replikey-postgres-slave:
restart: always
image: l1drm/replikey:latest
profiles: [replikey-slave]
user: "${MISSKEY_UID}:${MISSKEY_GID}"
links:
- db
- redis
networks:
- internal_network
- external_network
ports:
# - "4001:4001"
volumes:
- ./replikey:/etc/replikey:ro
command: [
"network",
"forward-proxy",
"--listen",
"0.0.0.0:4001",
"--sni",
"${MTLS_POSTGRES_SNI}",
"--target",
"db:5432",
"--cert",
"/etc/replikey/cert.pem",
"--key",
"/etc/replikey/key.pem",
"--ca",
"/etc/replikey/ca.pem",
]
replikey-redis-slave:
restart: always
image: l1drm/replikey:latest
profiles: [replikey-slave]
user: "${MISSKEY_UID}:${MISSKEY_GID}"
links:
- db
- redis
networks:
- internal_network
- external_network
ports:
# - "4002:4002"
volumes:
- ./replikey:/etc/replikey:ro
command: [
"network",
"forward-proxy",
"--listen",
"0.0.0.0:4002",
"--sni",
"${MTLS_REDIS_SNI}",
"--target",
"redis:6379",
"--cert",
"/etc/replikey/cert.pem",
"--key",
"/etc/replikey/key.pem",
"--ca",
"/etc/replikey/ca.pem",
]
# mcaptcha: # mcaptcha:
# restart: always # restart: always
# image: mcaptcha/mcaptcha:latest # image: mcaptcha/mcaptcha:latest