From 96b0cd8fe71004019daf8ff5d022a1572030d296 Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 26 Jan 2023 13:54:48 -0800 Subject: [PATCH] Add mariadb for nextcloud --- .../server/config/nextcloud/docker-compose.yml | 17 ++++++++++++++++- homelab/server/config/nextcloud/mariadb.env | 5 +++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 homelab/server/config/nextcloud/mariadb.env diff --git a/homelab/server/config/nextcloud/docker-compose.yml b/homelab/server/config/nextcloud/docker-compose.yml index b819adc6..25498441 100644 --- a/homelab/server/config/nextcloud/docker-compose.yml +++ b/homelab/server/config/nextcloud/docker-compose.yml @@ -13,6 +13,8 @@ services: keep-file: "true" env_file: - nextcloud.env + depends_on: + - mariadb labels: - traefik.http.routers.nextcloud.rule=Host(`nextcloud.jafner.net`) - traefik.http.routers.nextcloud.tls.certresolver=lets-encrypt @@ -21,10 +23,23 @@ services: #- traefik.http.services.nextcloud.loadbalancer.server.port=443 networks: - web + - nextcloud volumes: - $DOCKER_DATA/config:/config - $DOCKER_DATA/data:/data + mariadb: + image: lscr.io/linuxserver/mariadb + container_name: nextcloud_mariadb + networks: + - nextcloud + env_file: + - mariadb.env + - mariadb_secrets.env + volumes: + - $DOCKER_DATA/mariadb:/config + networks: web: - external: true \ No newline at end of file + external: true + nextcloud: \ No newline at end of file diff --git a/homelab/server/config/nextcloud/mariadb.env b/homelab/server/config/nextcloud/mariadb.env new file mode 100644 index 00000000..b9076b7d --- /dev/null +++ b/homelab/server/config/nextcloud/mariadb.env @@ -0,0 +1,5 @@ +PUID=1000 +PGID=1000 +TZ=America/Los_Angeles +MYSQL_DATABASE=nextcloud +MYSQL_USER=ncuser