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

This commit is contained in:
Kevin Veen-Birkenbach 2023-12-14 01:34:12 +01:00
parent 4cdfcee4d2
commit 47bb0290c6
7 changed files with 33 additions and 33 deletions

View File

@ -6,7 +6,7 @@ services:
env_file: .env env_file: .env
environment: environment:
- "POSTGRES_HOST_AUTH_METHOD=trust" - "POSTGRES_HOST_AUTH_METHOD=trust"
image: postgres:alpine image: postgres:15-alpine
volumes: volumes:
- database:/var/lib/postgresql/data - database:/var/lib/postgresql/data

View File

@ -11,7 +11,7 @@ x-application-defaults: &application-defaults
- TZ=Etc/UTC - TZ=Etc/UTC
x-database-defaults: &database-defaults x-database-defaults: &database-defaults
image: postgres:alpine image: postgres:13-alpine
ports: ports:
- "9432:5432" - "9432:5432"
networks: networks:

View File

@ -2,7 +2,7 @@ version: '3'
services: services:
database: database:
restart: always restart: always
image: postgres:alpine image: postgres:14-alpine
shm_size: 256mb shm_size: 256mb
networks: networks:
- internal_network - internal_network

View File

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

View File

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

View File

@ -28,21 +28,21 @@ services:
database: database:
logging: logging:
driver: journald driver: journald
options: image: mariadb
tag: "mybb_database"
environment:
POSTGRES_DB: mybb
POSTGRES_PASSWORD: "{{mybb_database_password}}"
POSTGRES_USER: mybb
image: postgres:alpine
volumes:
- database:/var/lib/postgresql/data:rw
restart: always restart: always
environment:
MYSQL_DATABASE: "mybb"
MYSQL_USER: "mybb"
MYSQL_PASSWORD: "{{mybb_database_password}}"
MYSQL_ROOT_PASSWORD: "{{mybb_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U mybb"] test: "/usr/bin/mariadb --user=mybb --password={{mybb_database_password}} --execute \"SHOW DATABASES;\""
interval: 10s interval: 3s
timeout: 5s timeout: 1s
retries: 6 retries: 5
volumes: volumes:
database: database:
data: data:

View File

@ -17,7 +17,7 @@ services:
- redis - redis
restart: "always" restart: "always"
database: database:
image: postgres:alpine image: postgres:13-alpine
env_file: env_file:
- .env - .env
volumes: volumes: