Index: /branches/amp_4_0/platform/tools/container/manage_amp.sh
===================================================================
--- /branches/amp_4_0/platform/tools/container/manage_amp.sh	(revision 2905)
+++ /branches/amp_4_0/platform/tools/container/manage_amp.sh	(working copy)
@@ -20,7 +20,7 @@
 export TAG_HAPROXY="${TAG_HAPROXY:-3.3-alpine}"
 export TAG_REGISTRY="${TAG_REGISTRY:-3.0.0}"
 export TAG_BUSYBOX="${TAG_BUSYBOX:-1.37.0}"
-export TAG_ROCKY="${TAG_ROCKY:-9}"
+export TAG_ROCKY="${TAG_ROCKY:-9.6}"
 export TAG_AMP_CORE="${TAG_AMP_CORE:-1.0.0}"
 
 # Logging Configuration
@@ -41,7 +41,7 @@
     "haproxy:haproxy:${TAG_HAPROXY}"
     "registry:registry:${TAG_REGISTRY}"
     "busybox:busybox:${TAG_BUSYBOX}"
-    "rocky:rockylinux:${TAG_ROCKY}"
+    "rocky:rockylinux/rockylinux:${TAG_ROCKY}"
     "amp-core:${TAG_AMP_CORE}" # Backend + WebUI Agent
 )
 
@@ -1532,51 +1532,14 @@
              IMAGE_LIST="amp/timescaledb:${TAG_TIMESCALEDB} $IMAGE_LIST"
         elif [ "$SERVICE_NAME" == "amp-core" ]; then
              echo "  - Building amp-core Image (Backend + WebUI Agent)..."
-             
-             # Copy binaries from build output to the Docker context
+
              AMP_CORE_DIR="$SERVICES_DIR/amp-core"
-             AMP_CORE_BIN="$AMP_CORE_DIR/bin"
-             PROJECT_ROOT="$SCRIPT_DIR/../../.."
-             
-             mkdir -p "$AMP_CORE_BIN"
-             
-             # Find and copy backend binary
-             if [ -f "$PROJECT_ROOT/build/array/BUILD/amp-4.0.0/src/backend/backend" ]; then
-                 echo "  - Copying backend from build output..."
-                 cp "$PROJECT_ROOT/build/array/BUILD/amp-4.0.0/src/backend/backend" "$AMP_CORE_BIN/"
-             elif [ -f "/ca/bin/backend" ]; then
-                 echo "  - Copying backend from /ca/bin..."
-                 cp "/ca/bin/backend" "$AMP_CORE_BIN/"
-             else
-                 echo "  ❌ backend binary not found! Run 'make amp' first."
-                 exit 1
-             fi
-             
-             # Find and copy webui_agent binary
-             if [ -f "$PROJECT_ROOT/build/array/BUILD/amp-4.0.0/src/webui_agent/webui_agent" ]; then
-                 echo "  - Copying webui_agent from build output..."
-                 cp "$PROJECT_ROOT/build/array/BUILD/amp-4.0.0/src/webui_agent/webui_agent" "$AMP_CORE_BIN/"
-             elif [ -f "/ca/bin/webui_agent" ]; then
-                 echo "  - Copying webui_agent from /ca/bin..."
-                 cp "/ca/bin/webui_agent" "$AMP_CORE_BIN/"
-             else
-                 echo "  ❌ webui_agent binary not found! Run 'make amp' first."
-                 exit 1
-             fi
-             
-             # Find and copy ca_shell binary
-             if [ -f "$PROJECT_ROOT/build/array/BUILD/amp-4.0.0/src/cli/ca_shell" ]; then
-                 echo "  - Copying ca_shell from build output..."
-                 cp "$PROJECT_ROOT/build/array/BUILD/amp-4.0.0/src/cli/ca_shell" "$AMP_CORE_BIN/"
-             elif [ -f "/ca/bin/ca_shell" ]; then
-                 echo "  - Copying ca_shell from /ca/bin..."
-                 cp "/ca/bin/ca_shell" "$AMP_CORE_BIN/"
-             else
-                 echo "  ⚠️ ca_shell binary not found. Skipping."
-             fi
-             
-             # Build the Docker image
-             retry_command "docker build -t amp/amp-core:${TAG_AMP_CORE} \"$AMP_CORE_DIR\"" || exit 1
+             echo "  - Delegating build to services/amp-core/build.sh..."
+             # Use the dedicated build script which handles binary/source copying
+             chmod +x "$AMP_CORE_DIR/build.sh"
+
+             "$AMP_CORE_DIR/build.sh" "$TAG_AMP_CORE" "local-build"
+             docker tag "local-build/amp/amp-core:${TAG_AMP_CORE}" "amp/amp-core:${TAG_AMP_CORE}"
              IMAGE_LIST="amp/amp-core:${TAG_AMP_CORE} $IMAGE_LIST"
         elif [ "$SERVICE_NAME" == "nginx" ]; then
              echo "  - Building nginx with GUI..."
@@ -1658,8 +1621,15 @@
         echo "Found local packages directory."
         
         echo "Installing Dependencies from local RPMs..."
+        
+        # Prevent OS Upgrade: Skip release packages that would update OS version
+        if ls packages/rocky-release*.rpm >/dev/null 2>&1; then
+             echo "  - Removing rocky-release packages to prevent OS upgrade..."
+             rm -f packages/rocky-release*.rpm packages/rocky-repos*.rpm packages/rocky-gpg-keys*.rpm
+        fi
+
         # Use --skip-broken to handle version conflicts and --allowerasing for package replacements
-        sudo dnf install -y packages/*.rpm --disablerepo='*' --skip-broken --allowerasing
+        sudo dnf install -y packages/*.rpm --disablerepo='*' --skip-broken --allowerasing --exclude="rocky-release*"
         
         # Explicitly check and install Docker if it failed
         if ! command -v docker &> /dev/null; then
Index: /branches/amp_4_0/platform/tools/container/services/amp-core/Dockerfile
===================================================================
--- /branches/amp_4_0/platform/tools/container/services/amp-core/Dockerfile	(revision 2905)
+++ /branches/amp_4_0/platform/tools/container/services/amp-core/Dockerfile	(working copy)
@@ -1,12 +1,11 @@
-FROM rockylinux:9
+FROM rockylinux/rockylinux:9.6
 
 LABEL maintainer="Array Networks" \
       description="AMP Core Services - Backend, WebUI Agent, and Python API" \
       version="4.0.0"
 
 # Install runtime dependencies
-RUN dnf update -y && \
-    dnf install -y epel-release && \
+RUN dnf install -y epel-release && \
     dnf install -y --allowerasing \
     # Python 3.11 runtime (latest in EPEL for Rocky 9)
     python3.11 \
@@ -58,6 +57,7 @@
 COPY bin/webui_agent /ca/bin/webui_agent
 COPY bin/ca_shell /ca/bin/ca_shell
 COPY backend_wrapper.sh /ca/bin/backend_wrapper.sh
+COPY wait_for_db.py /ca/bin/wait_for_db.py
 
 # Make binaries executable
 RUN chmod +x /ca/bin/backend /ca/bin/webui_agent /ca/bin/ca_shell /ca/bin/backend_wrapper.sh
Index: /branches/amp_4_0/platform/tools/container/services/amp-core/supervisord.conf
===================================================================
--- /branches/amp_4_0/platform/tools/container/services/amp-core/supervisord.conf	(revision 2905)
+++ /branches/amp_4_0/platform/tools/container/services/amp-core/supervisord.conf	(working copy)
@@ -48,7 +48,7 @@
 ; AMP API Service - Python Backend API via Gunicorn
 ; ============================================================
 [program:amp_api]
-command=gunicorn --bind 0.0.0.0:8000 --workers 4 --timeout 120 djproject.wsgi:application
+command=bash -c "python3 /ca/bin/wait_for_db.py && gunicorn --bind 0.0.0.0:8000 --workers 1 --threads 4 --timeout 120 djproject.wsgi:application"
 directory=/ca/webui/htdocs/new/src
 environment=DJANGO_SETTINGS_MODULE="djproject.settings",PYTHONPATH="/ca/webui/htdocs/new/src:/ca/webui/htdocs/new/src/hive"
 autostart=true
Index: /branches/amp_4_0/platform/tools/container/services/amp-core/wait_for_db.py
===================================================================
--- /branches/amp_4_0/platform/tools/container/services/amp-core/wait_for_db.py	(nonexistent)
+++ /branches/amp_4_0/platform/tools/container/services/amp-core/wait_for_db.py	(working copy)
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+import socket
+import time
+import os
+import sys
+
+def wait_for_postgres():
+    host = os.environ.get('DB_HOST', 'host.docker.internal')
+    port = int(os.environ.get('DB_PORT', 5432))
+    
+    print(f"Waiting for database at {host}:{port}...")
+    
+    start_time = time.time()
+    while True:
+        try:
+            with socket.create_connection((host, port), timeout=5):
+                print(f"Database {host}:{port} is ready!")
+                return True
+        except (OSError, ConnectionRefusedError):
+            if time.time() - start_time > 60:
+                print(f"Timeout waiting for database {host}:{port}")
+                sys.exit(1)
+            print("Database not ready yet, retrying in 2s...")
+            time.sleep(2)
+
+if __name__ == "__main__":
+    wait_for_postgres()
Index: /branches/amp_4_0/platform/tools/container/services/backend/Dockerfile
===================================================================
--- /branches/amp_4_0/platform/tools/container/services/backend/Dockerfile	(revision 2905)
+++ /branches/amp_4_0/platform/tools/container/services/backend/Dockerfile	(working copy)
@@ -1,8 +1,7 @@
-FROM rockylinux:9
+FROM rockylinux/rockylinux:9.6
 
 # 1. Install system dependencies and build tools (matching install_python.sh)
-RUN dnf update -y && \
-    dnf install -y \
+RUN dnf install -y \
     tar \
     wget \
     gcc \
Index: /branches/amp_4_0/platform/tools/container/services/setup/install_python.sh
===================================================================
--- /branches/amp_4_0/platform/tools/container/services/setup/install_python.sh	(revision 2905)
+++ /branches/amp_4_0/platform/tools/container/services/setup/install_python.sh	(working copy)
@@ -16,8 +16,8 @@
   exit 1
 fi
 
-echo "Step 1: Updating system packages..."
-dnf update -y
+echo "Step 1: Skipping system update to maintain version 9.6..."
+# dnf update -y
 
 echo "Step 2: Installing necessary build dependencies..."
 dnf install -y \
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/settings.py
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/settings.py	(revision 2905)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/djproject/settings.py	(working copy)
@@ -104,7 +104,7 @@
     'django.middleware.locale.LocaleMiddleware',
     'hive.session.HiveSessionMiddleware',
 )
-
+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
 CSRF_COOKIE_SECURE = True
 ROOT_URLCONF = 'djproject.urls'
 
Index: /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/devices/add-device.html
===================================================================
--- /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/devices/add-device.html	(revision 2905)
+++ /branches/amp_4_0/src/webui/webui/htdocs/new/src/gui/src/app/components/sub-components/devices/add-device.html	(working copy)
@@ -159,7 +159,7 @@
     @if (!['AG', 'vxAG'].includes(deviceForm.get('deviceType')?.value) &&
     !data?.otherDeviceType.includes(deviceForm.get('deviceType')?.value)) {
     <div class="form-field-wrapper">
-      <label for="webuiUsername" class="form-label">WebUI Username</label>
+      <label for="webuiUsername" class="form-label">WebUI Username *</label>
       <mat-form-field appearance="outline" subscriptSizing="dynamic">
         <input id="webuiUsername" formControlName="webuiUsername" matInput placeholder="WebUI Username" type="text" />
         @if (deviceForm.get('webuiUsername')?.invalid && deviceForm.get('webuiUsername')?.touched) {
@@ -174,7 +174,7 @@
       </mat-form-field>
     </div>
     <div class="form-field-wrapper">
-      <label for="webuiPassword" class="form-label">WebUI Password</label>
+      <label for="webuiPassword" class="form-label">WebUI Password *</label>
       <mat-form-field appearance="outline" subscriptSizing="dynamic">
         <input id="webuiPassword" formControlName="webuiPassword" matInput placeholder="WebUI Password"
           type="password" />
