From 3dd9424341f7ba693116faf8140f0b4e812d6c0a Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Mon, 23 Sep 2024 15:18:31 +0530 Subject: [PATCH] fix: only depend on minio and redis if it's enabled --- docker-compose/1_Auto_Upstall/noco.sh | 29 +++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/docker-compose/1_Auto_Upstall/noco.sh b/docker-compose/1_Auto_Upstall/noco.sh index e5692b677c..cedbef30ee 100755 --- a/docker-compose/1_Auto_Upstall/noco.sh +++ b/docker-compose/1_Auto_Upstall/noco.sh @@ -496,11 +496,20 @@ generate_credentials() { create_docker_compose_file() { - image="nocodb/nocodb:latest" + if [ "${CONFIG_EDITION}" = "EE" ] || [ "${CONFIG_EDITION}" = "ee" ]; then + image="nocodb/ee:latest" + else + image="nocodb/nocodb:latest" + fi - if [ "${CONFIG_EDITION}" = "EE" ] || [ "${CONFIG_EDITION}" = "ee" ]; then - image="nocodb/ee:latest" - fi + + # for easier string interpolation + if [ "${CONFIG_REDIS_ENABLED}" = "Y" ]; then + gen_redis=1 + fi + if [ "${CONFIG_MINIO_ENABLED}" = "Y" ]; then + gen_minio=1 + fi local compose_file="docker-compose.yml" @@ -514,8 +523,8 @@ services: replicas: ${CONFIG_NUM_INSTANCES} depends_on: - db - ${CONFIG_REDIS_ENABLED:+- redis} - ${CONFIG_MINIO_ENABLED:+- minio} + ${gen_redis:+- redis} + ${gen_minio:+- minio} restart: unless-stopped volumes: - ./nocodb:/usr/app/data @@ -674,10 +683,14 @@ fi EOF fi - cat >> "$compose_file" <> "$compose_file" <> "$compose_file" <