Skip to content

Commit 6d62796

Browse files
committed
🔧 Update Dockerfiles and GA to use Bun
1 parent f590322 commit 6d62796

4 files changed

Lines changed: 28 additions & 21 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ jobs:
4848
fail-fast: false
4949
steps:
5050
- uses: actions/checkout@v6
51-
- uses: actions/setup-node@v6
52-
with:
53-
node-version: lts/*
51+
- uses: oven-sh/setup-bun@v2
5452
- uses: actions/setup-python@v6
5553
with:
5654
python-version: '3.10'
@@ -66,7 +64,7 @@ jobs:
6664
enable-cache: true
6765
- run: uv sync
6866
working-directory: backend
69-
- run: npm ci
67+
- run: bun ci
7068
working-directory: frontend
7169
- run: uv run bash scripts/generate-client.sh
7270
env:
@@ -94,11 +92,9 @@ jobs:
9492
runs-on: ubuntu-latest
9593
steps:
9694
- uses: actions/checkout@v6
97-
- uses: actions/setup-node@v6
98-
with:
99-
node-version: 20
95+
- uses: oven-sh/setup-bun@v2
10096
- name: Install dependencies
101-
run: npm ci
97+
run: bun ci
10298
- name: Download blob reports from GitHub Actions Artifacts
10399
uses: actions/download-artifact@v7
104100
with:

docker-compose.override.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,16 @@ services:
9898
ports:
9999
- "5173:80"
100100
build:
101-
context: ./frontend
101+
context: .
102+
dockerfile: frontend/Dockerfile
102103
args:
103104
- VITE_API_URL=http://localhost:8000
104105
- NODE_ENV=development
105106

106107
playwright:
107108
build:
108-
context: ./frontend
109-
dockerfile: Dockerfile.playwright
109+
context: .
110+
dockerfile: frontend/Dockerfile.playwright
110111
args:
111112
- VITE_API_URL=http://backend:8000
112113
- NODE_ENV=production
@@ -123,8 +124,8 @@ services:
123124
- PLAYWRIGHT_HTML_HOST=0.0.0.0
124125
- CI=${CI}
125126
volumes:
126-
- ./frontend/blob-report:/app/blob-report
127-
- ./frontend/test-results:/app/test-results
127+
- ./frontend/blob-report:/app/frontend/blob-report
128+
- ./frontend/test-results:/app/frontend/test-results
128129
ports:
129130
- 9323:9323
130131

frontend/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ FROM oven/bun:1 AS build-stage
33

44
WORKDIR /app
55

6-
COPY package.json bun.lock* /app/
6+
COPY package.json bun.lock /app/
77

8-
RUN bun install
8+
COPY frontend/package.json /app/frontend/
9+
10+
WORKDIR /app/frontend
911

10-
COPY ./ /app/
12+
RUN bun install
1113

14+
COPY ./frontend /app/frontend
1215
ARG VITE_API_URL
1316

1417
RUN bun run build
@@ -17,7 +20,7 @@ RUN bun run build
1720
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
1821
FROM nginx:1
1922

20-
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
23+
COPY --from=build-stage /app/frontend/dist/ /usr/share/nginx/html
2124

22-
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
23-
COPY ./nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf
25+
COPY ./frontend/nginx.conf /etc/nginx/conf.d/default.conf
26+
COPY ./frontend/nginx-backend-not-found.conf /etc/nginx/extra-conf.d/backend-not-found.conf

frontend/Dockerfile.playwright

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@ FROM mcr.microsoft.com/playwright:v1.57.0-noble
22

33
WORKDIR /app
44

5+
RUN apt-get update && apt-get install -y unzip \
6+
&& rm -rf /var/lib/apt/lists/*
7+
58
RUN curl -fsSL https://bun.sh/install | bash
69
ENV PATH="/root/.bun/bin:$PATH"
710

8-
COPY package*.json bun.lock* /app/
11+
COPY package.json bun.lock /app/
12+
13+
COPY frontend/package.json /app/frontend/
14+
15+
WORKDIR /app/frontend
916

1017
RUN bun install
1118

12-
COPY ./ /app/
19+
COPY ./frontend /app/frontend
1320

1421
ARG VITE_API_URL

0 commit comments

Comments
 (0)