From 1656f5824d32f6796ba2982bb0b98b77650f432b Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Mon, 25 Oct 2021 14:26:22 -0700 Subject: [PATCH] fix(docker): restore mariadb service Additionally, for now, no-op usage of the MARIADB_SOCKET_DIR environment variable. This is particularly useful for a serious production setup, but we don't currently use that. Signed-off-by: Kevin Morris --- docker-compose.aur-dev.yml | 7 ------- docker-compose.override.yml | 15 --------------- docker-compose.yml | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/docker-compose.aur-dev.yml b/docker-compose.aur-dev.yml index f03d0a4f..2e7610dc 100644 --- a/docker-compose.aur-dev.yml +++ b/docker-compose.aur-dev.yml @@ -19,7 +19,6 @@ services: volumes: - ${GIT_DATA_DIR}:/aurweb/aur.git - cache:/cache - - ${MARIADB_SOCKET_DIR}:/var/run/mysqld smartgit: restart: always @@ -42,7 +41,6 @@ services: restart: always volumes: - cache:/cache - - ${MARIADB_SOCKET_DIR}:/var/run/mysqld fastapi: restart: always @@ -50,11 +48,6 @@ services: - FASTAPI_BACKEND="gunicorn" volumes: - cache:/cache - - ${MARIADB_SOCKET_DIR}:/var/run/mysqld - - mariadb_init: - volumes: - - ${MARIADB_SOCKET_DIR}:/var/run/mysqld nginx: restart: always diff --git a/docker-compose.override.yml b/docker-compose.override.yml index e702659e..7349ac66 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,21 +1,6 @@ version: "3.8" services: - mariadb: - image: aurweb:latest - init: true - entrypoint: /docker/mariadb-entrypoint.sh - command: /usr/bin/mysqld_safe --datadir=/var/lib/mysql - ports: - # This will expose mariadbd on 127.0.0.1:13306 in the host. - # Ex: `mysql -uaur -paur -h 127.0.0.1 -P 13306 aurweb` - - "13306:3306" - volumes: - - mariadb_run:/var/run/mysqld # Bind socket in this volume. - - mariadb_data:/var/lib/mysql - healthcheck: - test: "bash /docker/health/mariadb.sh" - mariadb_init: depends_on: mariadb: diff --git a/docker-compose.yml b/docker-compose.yml index e19c8fb7..195be637 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,6 +48,21 @@ services: ports: - "16379:6379" + mariadb: + image: aurweb:latest + init: true + entrypoint: /docker/mariadb-entrypoint.sh + command: /usr/bin/mysqld_safe --datadir=/var/lib/mysql + ports: + # This will expose mariadbd on 127.0.0.1:13306 in the host. + # Ex: `mysql -uaur -paur -h 127.0.0.1 -P 13306 aurweb` + - "13306:3306" + volumes: + - mariadb_run:/var/run/mysqld # Bind socket in this volume. + - mariadb_data:/var/lib/mysql + healthcheck: + test: "bash /docker/health/mariadb.sh" + mariadb_init: image: aurweb:latest init: true @@ -55,6 +70,9 @@ services: command: echo "MariaDB tables initialized." volumes: - mariadb_run:/var/run/mysqld + depends_on: + mariadb: + condition: service_healthy git: image: aurweb:latest