From 5f79109195edc4d5d96f55c36db0830bed6f4a4b Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 18 Mar 2020 21:35:17 +0000 Subject: [PATCH] Convert nextcloud db to postgres --- .../roles/docker/files/nextcloud/config.php | 6 +++--- .../docker/files/nextcloud/docker-compose.yml | 19 +++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ansible/roles/docker/files/nextcloud/config.php b/ansible/roles/docker/files/nextcloud/config.php index 5c339e5..eba46dd 100644 --- a/ansible/roles/docker/files/nextcloud/config.php +++ b/ansible/roles/docker/files/nextcloud/config.php @@ -18,12 +18,12 @@ $CONFIG = array ( array ( 0 => 'intersect.jakehoward.tech', ), - 'dbtype' => 'mysql', + 'dbtype' => 'pgsql', 'version' => '18.0.2.2', 'overwrite.cli.url' => 'https://intersect.jakehoward.tech', 'dbname' => 'nextcloud', - 'dbhost' => 'mariadb:3306', - 'dbport' => '', + 'dbhost' => 'db', + 'dbport' => '5432', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud', diff --git a/ansible/roles/docker/files/nextcloud/docker-compose.yml b/ansible/roles/docker/files/nextcloud/docker-compose.yml index 8c6f4b2..092d2c5 100644 --- a/ansible/roles/docker/files/nextcloud/docker-compose.yml +++ b/ansible/roles/docker/files/nextcloud/docker-compose.yml @@ -24,19 +24,14 @@ services: - "traefik.http.routers.nextcloud.tls=true" - "traefik.http.routers.nextcloud.tls.certresolver=le" - mariadb: - image: linuxserver/mariadb:110.4.12mariabionic-ls53 - environment: - - PUID={{ docker_user.id }} - - PGID={{ docker_user.id }} - - MYSQL_ROOT_PASSWORD=root - - TZ=Europe/London - - MYSQL_DATABASE=nextcloud - - MYSQL_USER=nextcloud - - MYSQL_PASSWORD=nextcloud - volumes: - - /srv/nextcloud-mariadb:/config + db: + image: postgres:12-alpine restart: unless-stopped + volumes: + - ./postgres:/var/lib/postgresql/data + environment: + - POSTGRES_PASSWORD=nextcloud + - POSTGRES_USER=nextcloud redis: image: redis:5-alpine