1
+ # Development build - minimal context needed since content is volume-mounted
1
2
FROM node:24-bullseye AS base
2
3
3
4
# Create app directory
4
5
WORKDIR /app/src
5
6
6
- # Install dependencies
7
+ # Copy package files and install dependencies
8
+ # This is all that's needed for development since source is volume-mounted
7
9
COPY package.json package-lock.json ./
8
10
RUN npm ci
9
11
12
+ # Development debug build
10
13
FROM base AS debug
11
14
12
15
RUN apt-get update && apt-get install -y \
13
16
less \
14
17
iputils-ping \
15
18
dnsutils
16
19
17
- # Copy app source for development
18
- COPY . /app/src
20
+ # For development, source code is volume-mounted, not copied
19
21
22
+ # Broken link checker stage
20
23
FROM dcycle/broken-link-checker:3 AS broken_link_checker
21
24
25
+ # Production HTTP server build - needs full content
22
26
FROM httpd:2.4.64 AS httpd_serve
23
27
24
28
# Install curl for healthcheck
@@ -45,6 +49,7 @@ RUN if [ -f /tmp/build_context/httpd.conf ]; then \
45
49
# Copy site content to web directory
46
50
COPY . /usr/local/apache2/htdocs/
47
51
52
+ # Test build - needs some content for testing
48
53
FROM base AS tests
49
54
50
55
# Install necessary packages for Playwright
@@ -61,13 +66,11 @@ RUN apt-get update && apt-get install -y \
61
66
# Install Playwright browsers
62
67
RUN npx playwright install chromium --with-deps
63
68
64
- # Copy app source for testing
65
- COPY . /app/src
69
+ # Copy test files
70
+ COPY tests/ ./tests/
66
71
67
72
# Set default command to run BDD tests
68
73
CMD ["npm" , "run" , "test:bdd" ]
69
74
75
+ # Default stage for development - just the base with npm dependencies
70
76
FROM base
71
-
72
- # Copy app source for the final stage
73
- COPY . /app/src
0 commit comments