Skip to content

Commit d909403

Browse files
NotYuShengclaude
andcommitted
fix/offline-deploy-review-comments
- Replace curl with wget --spider in minio healthcheck (more portable on minimal images) - Default LLM_API_BASE_URL to Ollama local endpoint instead of OpenAI public API - Pin minio/minio and minio/mc to specific release tags (non-deterministic latest removed) - Allow VITE_API_BASE_URL to be overridden via .env using ${VAR:-default} pattern - Loop over DOCKERHUB_IMAGES array to save tars instead of hardcoding image names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c295235 commit d909403

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

docker-compose.offline.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ services:
3535

3636
# MinIO Object Storage
3737
minio:
38-
image: minio/minio:latest
38+
image: minio/minio:RELEASE.2024-11-07T00-52-20Z
3939
container_name: tracepcap-minio
4040
command: server /data --console-address ":9001"
4141
environment:
@@ -48,7 +48,7 @@ services:
4848
volumes:
4949
- minio_data:/data
5050
healthcheck:
51-
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
51+
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9000/minio/health/live"]
5252
interval: 30s
5353
timeout: 20s
5454
retries: 3
@@ -57,7 +57,7 @@ services:
5757

5858
# MinIO Client (mc) - Create bucket on startup
5959
minio-init:
60-
image: minio/mc:latest
60+
image: minio/mc:RELEASE.2024-11-21T17-21-54Z
6161
container_name: tracepcap-minio-init
6262
depends_on:
6363
- minio
@@ -86,7 +86,7 @@ services:
8686
MINIO_SECRET_KEY: minioadmin
8787
MINIO_BUCKET: tracepcap-files
8888
APP_MEMORY_MB: ${APP_MEMORY_MB:-2048}
89-
LLM_API_BASE_URL: ${LLM_API_BASE_URL:-https://api.openai.com/v1}
89+
LLM_API_BASE_URL: ${LLM_API_BASE_URL:-http://localhost:11434/v1}
9090
LLM_API_KEY: ${LLM_API_KEY:-your-api-key-here}
9191
LLM_MODEL: ${LLM_MODEL:-gpt-4}
9292
LLM_TEMPERATURE: ${LLM_TEMPERATURE:-0.7}

scripts/pull-and-save-images.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ echo "=== [1/3] Pulling third-party images ==="
5555
# --- Docker Hub ---
5656
DOCKERHUB_IMAGES=(
5757
"postgres:15-alpine"
58-
"minio/minio:latest"
59-
"minio/mc:latest"
58+
"minio/minio:RELEASE.2024-11-07T00-52-20Z"
59+
"minio/mc:RELEASE.2024-11-21T17-21-54Z"
6060
)
6161

6262
for img in "${DOCKERHUB_IMAGES[@]}"; do
@@ -78,7 +78,7 @@ docker build \
7878

7979
echo " Building nginx (frontend)..."
8080
docker build \
81-
--build-arg VITE_API_BASE_URL=/api \
81+
--build-arg "VITE_API_BASE_URL=${VITE_API_BASE_URL:-/api}" \
8282
--build-arg "VITE_SUPPORTED_FILE_TYPES=${VITE_SUPPORTED_FILE_TYPES:-.pcap,.pcapng,.cap}" \
8383
--build-arg "VITE_ANALYSIS_OPTIONS=${VITE_ANALYSIS_OPTIONS:-false}" \
8484
--build-arg "VITE_NETWORK_DIAGRAM_CONVERSATION_LIMIT=${VITE_NETWORK_DIAGRAM_CONVERSATION_LIMIT:-false}" \
@@ -92,11 +92,12 @@ docker build \
9292
echo ""
9393
echo "=== [3/3] Saving images to images/ ==="
9494

95-
save_image "postgres:15-alpine" "postgres_15-alpine.tar"
96-
save_image "minio/minio:latest" "minio_minio.tar"
97-
save_image "minio/mc:latest" "minio_mc.tar"
98-
save_image "$BACKEND_IMAGE" "tracepcap-backend.tar"
99-
save_image "$NGINX_IMAGE" "tracepcap-nginx.tar"
95+
for img in "${DOCKERHUB_IMAGES[@]}"; do
96+
filename="$(echo "$img" | tr '/:' '_').tar"
97+
save_image "$img" "$filename"
98+
done
99+
save_image "$BACKEND_IMAGE" "tracepcap-backend.tar"
100+
save_image "$NGINX_IMAGE" "tracepcap-nginx.tar"
100101

101102
# ---------------------------------------------------------------------------
102103
# Summary

0 commit comments

Comments
 (0)