Skip to content

Commit e0eb152

Browse files
feat: fix frontend docker builds
1 parent a14c75c commit e0eb152

2 files changed

Lines changed: 36 additions & 4 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

src/frontend/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
FROM node:25-alpine AS builder
1+
FROM node:18-alpine AS builder
22
WORKDIR /app
33
COPY package*.json .
44
RUN npm ci
55
COPY . .
6-
RUN npm run build
6+
RUN npm run build:node
77
RUN npm prune --production
88

9-
FROM node:25-alpine
9+
FROM node:18-alpine
1010
WORKDIR /app
1111
COPY --from=builder /app/build build/
1212
COPY --from=builder /app/node_modules node_modules/
1313
COPY package.json .
1414
EXPOSE 3000
1515
ENV NODE_ENV=production
16-
CMD [ "node", "build:node" ]
16+
CMD [ "node", "build" ]

0 commit comments

Comments
 (0)