Migrated some application to MariaDB and changed versions of Postgres to stay compatible with current installations

This commit is contained in:
2023-12-14 01:34:12 +01:00
parent 5443683042
commit d99c0e02b9
7 changed files with 33 additions and 33 deletions

View File

@@ -4,7 +4,7 @@ services:
synapse:
image: matrixdotorg/synapse:latest
restart: unless-stopped
restart: always
logging:
driver: journald
volumes:
@@ -18,24 +18,24 @@ services:
- "127.0.0.1:{{http_port}}:8008"
depends_on:
- database
database:
logging:
driver: journald
image: postgres:alpine
restart: unless-stopped
volumes:
- database:/var/lib/postgresql/data
driver: journald
image: mariadb
restart: always
environment:
- POSTGRES_DB=matrix
- POSTGRES_USER=matrix
- POSTGRES_PASSWORD={{matrix_database_password}}
- POSTGRES_INITDB_ARGS=--encoding=UTF8 --locale=C
MYSQL_DATABASE: "matrix"
MYSQL_USER: "matrix"
MYSQL_PASSWORD: "{{matrix_database_password}}"
MYSQL_ROOT_PASSWORD: "{{matrix_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U matrix"]
interval: 10s
timeout: 5s
retries: 6
test: "/usr/bin/mariadb --user=matrix --password={{matrix_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
# bridges
#mautrix-telegram:

View File

@@ -9,7 +9,7 @@ listeners:
- names: [client, federation]
compress: false
database:
name: psycopg2
name: mysql
args:
user: matrix
password: {{matrix_database_password}}