logical replicate DB (stage 1) #2
2 changed files with 123 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue