Browse Source

fix: only depend on minio and redis if it's enabled

pull/9536/head
sinanmohd 2 months ago
parent
commit
3dd9424341
  1. 23
      docker-compose/1_Auto_Upstall/noco.sh

23
docker-compose/1_Auto_Upstall/noco.sh

@ -496,10 +496,19 @@ generate_credentials() {
create_docker_compose_file() { create_docker_compose_file() {
image="nocodb/nocodb:latest"
if [ "${CONFIG_EDITION}" = "EE" ] || [ "${CONFIG_EDITION}" = "ee" ]; then if [ "${CONFIG_EDITION}" = "EE" ] || [ "${CONFIG_EDITION}" = "ee" ]; then
image="nocodb/ee:latest" image="nocodb/ee:latest"
else
image="nocodb/nocodb: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 fi
local compose_file="docker-compose.yml" local compose_file="docker-compose.yml"
@ -514,8 +523,8 @@ services:
replicas: ${CONFIG_NUM_INSTANCES} replicas: ${CONFIG_NUM_INSTANCES}
depends_on: depends_on:
- db - db
${CONFIG_REDIS_ENABLED:+- redis} ${gen_redis:+- redis}
${CONFIG_MINIO_ENABLED:+- minio} ${gen_minio:+- minio}
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./nocodb:/usr/app/data - ./nocodb:/usr/app/data
@ -674,10 +683,14 @@ fi
EOF EOF
fi fi
if [ "$CONFIG_REDIS_ENABLED" = "Y" ]; then
cat >> "$compose_file" <<EOF cat >> "$compose_file" <<EOF
volumes: volumes:
${CONFIG_REDIS_ENABLED:+redis:} redis:
EOF
fi
cat >> "$compose_file" <<EOF
networks: networks:
nocodb-network: nocodb-network:
driver: bridge driver: bridge

Loading…
Cancel
Save