File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Frontend Docker Build
2+
3+ on :
4+ push :
5+ branches : ['main']
6+ paths :
7+ - ' src/frontend/**'
8+ - ' .github/workflows/**'
9+ pull_request :
10+ branches : ['main']
11+ paths :
12+ - ' src/frontend/**'
13+ - ' .github/workflows/**'
14+ workflow_dispatch :
15+
16+ jobs :
17+ build-docker :
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - name : Checkout repository
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Build Docker image
28+ uses : docker/build-push-action@v5
29+ with :
30+ context : ./src/frontend
31+ file : ./src/frontend/Dockerfile
32+ push : false
Original file line number Diff line number Diff line change 1- FROM node:25 -alpine AS builder
1+ FROM node:18 -alpine AS builder
22WORKDIR /app
33COPY package*.json .
44RUN npm ci
55COPY . .
6- RUN npm run build
6+ RUN npm run build:node
77RUN npm prune --production
88
9- FROM node:25 -alpine
9+ FROM node:18 -alpine
1010WORKDIR /app
1111COPY --from=builder /app/build build/
1212COPY --from=builder /app/node_modules node_modules/
1313COPY package.json .
1414EXPOSE 3000
1515ENV NODE_ENV=production
16- CMD [ "node" , "build:node " ]
16+ CMD [ "node" , "build" ]
You can’t perform that action at this time.
0 commit comments