Преглед изворни кода

Fix dw start URL to use frontend port instead of backend port

The access URL was hardcoded to :8080 (backend), but users access
the app through the frontend nginx container on FRONTEND_PORT (default 80).
Also make apt non-interactive in setup-pi.sh to avoid config prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tuanchris пре 5 месеци
родитељ
комит
61c875fb29
2 измењених фајлова са 6 додато и 3 уклоњено
  1. 4 1
      dw
  2. 2 2
      setup-pi.sh

+ 4 - 1
dw

@@ -101,7 +101,10 @@ cmd_start() {
         sudo systemctl start dune-weaver
     fi
 
-    echo -e "${GREEN}Started!${NC} Access at http://$(hostname -I | awk '{print $1}'):8080"
+    local fe_port="${FRONTEND_PORT:-80}"
+    local port_suffix=""
+    [[ "$fe_port" != "80" ]] && port_suffix=":$fe_port"
+    echo -e "${GREEN}Started!${NC} Access at http://$(hostname -I | awk '{print $1}')${port_suffix}"
 }
 
 cmd_stop() {

+ 2 - 2
setup-pi.sh

@@ -86,7 +86,7 @@ print_success() {
 install_essentials() {
     print_step "Installing essential packages..."
     sudo apt update
-    sudo apt install -y git vim
+    sudo DEBIAN_FRONTEND=noninteractive apt install -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" git vim
     print_success "Essential packages installed"
 }
 
@@ -166,7 +166,7 @@ apply_wifi_fix() {
 update_system() {
     print_step "Updating system packages..."
     sudo apt update
-    sudo apt full-upgrade -y
+    sudo DEBIAN_FRONTEND=noninteractive apt full-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
     print_success "System updated"
 }