mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user