Update PostgreSQL image syntax and add TODO for volume renaming

- Modified the PostgreSQL image definition in docker-compose.yml to use a more robust syntax for the version variable.
- Added a TODO comment in docker-compose.yml to rename the volume for clarity in future updates.
- Simplified the service selection wizard in 04_wizard.sh by removing unnecessary dynamic sizing calculations.
This commit is contained in:
Yury Kossakovsky
2025-11-02 10:09:02 -07:00
parent 92db912ee3
commit 2ac966908d
2 changed files with 3 additions and 25 deletions

View File

@@ -403,7 +403,7 @@ services:
postgres:
container_name: postgres
image: postgres:${POSTGRES_VERSION:latest}
image: postgres:${POSTGRES_VERSION:-latest}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
@@ -415,6 +415,7 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: postgres
volumes:
# TODO: Rename to postgres_data
- langfuse_postgres_data:/var/lib/postgresql
redis:

View File

@@ -110,32 +110,9 @@ while [ $idx -lt ${#base_services_data[@]} ]; do
done
# Use whiptail to display the checklist
# Dynamically size dialog to the terminal
num_services=$(( ${#services[@]} / 3 ))
# Determine terminal dimensions with safe fallbacks
TERM_LINES=$(tput lines 2>/dev/null || echo 32)
TERM_COLS=$(tput cols 2>/dev/null || echo 100)
# Leave a small margin from terminal borders; clamp to sane min/max
DIALOG_HEIGHT=$(( TERM_LINES - 4 ))
[ $DIALOG_HEIGHT -lt 20 ] && DIALOG_HEIGHT=20
[ $DIALOG_HEIGHT -gt 40 ] && DIALOG_HEIGHT=40
DIALOG_WIDTH=$(( TERM_COLS - 4 ))
[ $DIALOG_WIDTH -lt 70 ] && DIALOG_WIDTH=70
[ $DIALOG_WIDTH -gt 200 ] && DIALOG_WIDTH=200
# Compute list height so buttons/text have space
LIST_HEIGHT=$(( DIALOG_HEIGHT - 6 ))
[ $LIST_HEIGHT -lt 10 ] && LIST_HEIGHT=10
# Cap list height to number of services to avoid extra empty space
[ $LIST_HEIGHT -gt $num_services ] && LIST_HEIGHT=$num_services
CHOICES=$(whiptail --title "Service Selection Wizard" --checklist \
"Choose the services you want to deploy.\nUse ARROW KEYS to navigate, SPACEBAR to select/deselect, ENTER to confirm." \
$DIALOG_HEIGHT $DIALOG_WIDTH $LIST_HEIGHT \
"Choose the services you want to deploy.\nUse ARROW KEYS to navigate, SPACEBAR to select/deselect, ENTER to confirm." 32 90 $num_services \
"${services[@]}" \
3>&1 1>&2 2>&3)