Browse Source

Merge pull request #9536 from sinanmohd/upstall-compose-fix

fix: compose configuration generation
pull/9547/head
Pranav C 2 months ago committed by GitHub
parent
commit
e8c650e43f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 31
      docker-compose/1_Auto_Upstall/noco.sh

31
docker-compose/1_Auto_Upstall/noco.sh

@ -496,11 +496,20 @@ generate_credentials() {
create_docker_compose_file() { create_docker_compose_file() {
image="nocodb/nocodb:latest" if [ "${CONFIG_EDITION}" = "EE" ] || [ "${CONFIG_EDITION}" = "ee" ]; then
image="nocodb/nocodb-ee:latest"
else
image="nocodb/nocodb:latest"
fi
if [ "${CONFIG_EDITION}" = "EE" ] || [ "${CONFIG_EDITION}" = "ee" ]; then
image="nocodb/ee:latest" # for easier string interpolation
fi 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" 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
@ -636,7 +645,6 @@ EOF
- "traefik.http.routers.minio.rule=Host(\`${CONFIG_MINIO_DOMAIN_NAME}\`)" - "traefik.http.routers.minio.rule=Host(\`${CONFIG_MINIO_DOMAIN_NAME}\`)"
EOF EOF
# If minio SSL is enabled, set the entry point to websecure # If minio SSL is enabled, set the entry point to websecure
fi
if [ "$CONFIG_MINIO_SSL_ENABLED" = "Y" ]; then if [ "$CONFIG_MINIO_SSL_ENABLED" = "Y" ]; then
cat >> "$compose_file" <<EOF cat >> "$compose_file" <<EOF
- "traefik.http.routers.minio.entrypoints=websecure" - "traefik.http.routers.minio.entrypoints=websecure"
@ -660,6 +668,7 @@ EOF
- nocodb-network - nocodb-network
EOF EOF
fi
if [ "${CONFIG_WATCHTOWER_ENABLED}" = "Y" ]; then if [ "${CONFIG_WATCHTOWER_ENABLED}" = "Y" ]; then
cat >> "$compose_file" <<EOF cat >> "$compose_file" <<EOF
watchtower: watchtower:
@ -674,10 +683,14 @@ EOF
EOF EOF
fi fi
cat >> "$compose_file" <<EOF if [ "$CONFIG_REDIS_ENABLED" = "Y" ]; then
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