From 5645a95dd65b30c18bbdd3673a8312723ce8e567 Mon Sep 17 00:00:00 2001 From: "Stephanos A." Date: Tue, 2 Jun 2026 23:01:43 +0300 Subject: [PATCH] fix: Add build output validation to Dockerfile.web - Verify dist directory exists after build completes - Provides better error messaging if build outputs are missing - Prevents silent failures that result in empty COPY commands --- infrastructure/docker/Dockerfile.web | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/infrastructure/docker/Dockerfile.web b/infrastructure/docker/Dockerfile.web index 02d567473..d6964a2a4 100644 --- a/infrastructure/docker/Dockerfile.web +++ b/infrastructure/docker/Dockerfile.web @@ -33,6 +33,14 @@ RUN pnpm turbo build --filter="${TURBO_FILTER}..." || \ ls -la /app/${APP_PATH}/ 2>/dev/null || echo "App path does not exist" && \ exit 1) +# Verify build output exists before proceeding +RUN if [ ! -d "/app/${APP_PATH}/dist" ]; then \ + echo "ERROR: Build output directory not found at /app/${APP_PATH}/dist"; \ + echo "Contents of /app/${APP_PATH}:"; \ + ls -la /app/${APP_PATH}/ 2>/dev/null || echo "Directory does not exist"; \ + exit 1; \ + fi + FROM nginx:alpine AS runner ARG APP_PATH COPY infrastructure/nginx/spa.conf /etc/nginx/conf.d/default.conf