From 47bb0290c6e661b841824d6375492ddfdcba3f8a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 14 Dec 2023 01:34:12 +0100 Subject: [PATCH] Migrated some application to MariaDB and changed versions of Postgres to stay compatible with current installations --- .../templates/docker-compose.yml.j2 | 2 +- .../templates/docker-compose.yml.j2 | 2 +- .../templates/docker-compose.yml.j2 | 2 +- .../templates/docker-compose.yml.j2 | 30 +++++++++---------- .../templates/homeserver.yaml.j2 | 2 +- .../templates/docker-compose.yml.j2 | 26 ++++++++-------- .../templates/docker-compose.yml.j2 | 2 +- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/roles/docker-funkwhale/templates/docker-compose.yml.j2 b/roles/docker-funkwhale/templates/docker-compose.yml.j2 index afc17e0e..9f63ce78 100644 --- a/roles/docker-funkwhale/templates/docker-compose.yml.j2 +++ b/roles/docker-funkwhale/templates/docker-compose.yml.j2 @@ -6,7 +6,7 @@ services: env_file: .env environment: - "POSTGRES_HOST_AUTH_METHOD=trust" - image: postgres:alpine + image: postgres:15-alpine volumes: - database:/var/lib/postgresql/data diff --git a/roles/docker-listmonk/templates/docker-compose.yml.j2 b/roles/docker-listmonk/templates/docker-compose.yml.j2 index 7f115b4c..f5f8185a 100644 --- a/roles/docker-listmonk/templates/docker-compose.yml.j2 +++ b/roles/docker-listmonk/templates/docker-compose.yml.j2 @@ -11,7 +11,7 @@ x-application-defaults: &application-defaults - TZ=Etc/UTC x-database-defaults: &database-defaults - image: postgres:alpine + image: postgres:13-alpine ports: - "9432:5432" networks: diff --git a/roles/docker-mastodon/templates/docker-compose.yml.j2 b/roles/docker-mastodon/templates/docker-compose.yml.j2 index 293a67a4..9a4d5edd 100644 --- a/roles/docker-mastodon/templates/docker-compose.yml.j2 +++ b/roles/docker-mastodon/templates/docker-compose.yml.j2 @@ -2,7 +2,7 @@ version: '3' services: database: restart: always - image: postgres:alpine + image: postgres:14-alpine shm_size: 256mb networks: - internal_network diff --git a/roles/docker-matrix/templates/docker-compose.yml.j2 b/roles/docker-matrix/templates/docker-compose.yml.j2 index f7fb8fab..7ddf0468 100644 --- a/roles/docker-matrix/templates/docker-compose.yml.j2 +++ b/roles/docker-matrix/templates/docker-compose.yml.j2 @@ -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: diff --git a/roles/docker-matrix/templates/homeserver.yaml.j2 b/roles/docker-matrix/templates/homeserver.yaml.j2 index 3c95afd4..61fb3cb2 100644 --- a/roles/docker-matrix/templates/homeserver.yaml.j2 +++ b/roles/docker-matrix/templates/homeserver.yaml.j2 @@ -9,7 +9,7 @@ listeners: - names: [client, federation] compress: false database: - name: psycopg2 + name: mysql args: user: matrix password: {{matrix_database_password}} diff --git a/roles/docker-mybb/templates/docker-compose.yml.j2 b/roles/docker-mybb/templates/docker-compose.yml.j2 index 6e02a835..edf8d0e2 100644 --- a/roles/docker-mybb/templates/docker-compose.yml.j2 +++ b/roles/docker-mybb/templates/docker-compose.yml.j2 @@ -28,21 +28,21 @@ services: database: logging: driver: journald - options: - 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 + image: mariadb 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: - test: ["CMD-SHELL", "pg_isready -U mybb"] - interval: 10s - timeout: 5s - retries: 6 + test: "/usr/bin/mariadb --user=mybb --password={{mybb_database_password}} --execute \"SHOW DATABASES;\"" + interval: 3s + timeout: 1s + retries: 5 volumes: database: data: diff --git a/roles/docker-peertube/templates/docker-compose.yml.j2 b/roles/docker-peertube/templates/docker-compose.yml.j2 index d034bd75..06033853 100644 --- a/roles/docker-peertube/templates/docker-compose.yml.j2 +++ b/roles/docker-peertube/templates/docker-compose.yml.j2 @@ -17,7 +17,7 @@ services: - redis restart: "always" database: - image: postgres:alpine + image: postgres:13-alpine env_file: - .env volumes: