1+ # Development build - minimal context needed since content is volume-mounted
12FROM node:24-bullseye AS base
23
34# Create app directory
45WORKDIR /app/src
56
6- # Install dependencies
7+ # Copy package files and install dependencies
8+ # This is all that's needed for development since source is volume-mounted
79COPY package.json package-lock.json ./
810RUN npm ci
911
12+ # Development debug build
1013FROM base AS debug
1114
1215RUN apt-get update && apt-get install -y \
1316 less \
1417 iputils-ping \
1518 dnsutils
1619
17- # Copy app source for development
18- COPY . /app/src
20+ # For development, source code is volume-mounted, not copied
1921
22+ # Broken link checker stage
2023FROM dcycle/broken-link-checker:3 AS broken_link_checker
2124
25+ # Production HTTP server build - needs full content
2226FROM httpd:2.4.64 AS httpd_serve
2327
2428# Install curl for healthcheck
@@ -45,6 +49,7 @@ RUN if [ -f /tmp/build_context/httpd.conf ]; then \
4549# Copy site content to web directory
4650COPY . /usr/local/apache2/htdocs/
4751
52+ # Test build - needs some content for testing
4853FROM base AS tests
4954
5055# Install necessary packages for Playwright
@@ -61,13 +66,11 @@ RUN apt-get update && apt-get install -y \
6166# Install Playwright browsers
6267RUN npx playwright install chromium --with-deps
6368
64- # Copy app source for testing
65- COPY . /app/src
69+ # Copy test files
70+ COPY tests/ ./tests/
6671
6772# Set default command to run BDD tests
6873CMD ["npm" , "run" , "test:bdd" ]
6974
75+ # Default stage for development - just the base with npm dependencies
7076FROM base
71-
72- # Copy app source for the final stage
73- COPY . /app/src
0 commit comments