From e9fc27a33b1583f307920e7085f91e1bc401d13e Mon Sep 17 00:00:00 2001 From: Steven Guikal Date: Tue, 19 Oct 2021 18:20:52 -0400 Subject: [PATCH] feat(docker): make git data directory host-configurable Signed-off-by: Steven Guikal --- .env | 1 + docker-compose.prod.yml | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 1162359f..6a383e6d 100644 --- a/.env +++ b/.env @@ -3,3 +3,4 @@ FASTAPI_WORKERS=2 MARIADB_SOCKET_DIR="/var/run/mysqld/" CGIT_CLONE_PREFIX_PHP=https://localhost:8443 CGIT_CLONE_PREFIX_FASTAPI=https://localhost:8444 +GIT_DATA_DIR="./aur.git/" diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index c63d63f5..9ea26663 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -7,16 +7,24 @@ services: git: volumes: - - git_data:/aurweb/aur.git + - ${GIT_DATA_DIR}:/aurweb/aur.git - cache:/cache - ${MARIADB_SOCKET_DIR}:/var/run/mysqld smartgit: volumes: - - git_data:/aurweb/aur.git + - ${GIT_DATA_DIR}:/aurweb/aur.git - cache:/cache - smartgit_run:/var/run/smartgit + cgit-php: + volumes: + - ${GIT_DATA_DIR}:/aurweb/aur.git + + cgit-fastapi: + volumes: + - ${GIT_DATA_DIR}:/aurweb/aur.git + php-fpm: volumes: - cache:/cache @@ -35,7 +43,7 @@ services: nginx: volumes: - - git_data:/aurweb/aur.git + - ${GIT_DATA_DIR}:/aurweb/aur.git - cache:/cache - logs:/var/log/nginx - smartgit_run:/var/run/smartgit