Skip to content

Commit c93e2bd

Browse files
committed
Frontend hot reload via docker compose watch
1 parent 1c6d656 commit c93e2bd

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

compose.override.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,27 @@ services:
9999
- "5173:80"
100100
build:
101101
context: .
102-
dockerfile: frontend/Dockerfile
102+
dockerfile: frontend/Dockerfile.dev
103103
args:
104104
- VITE_API_URL=http://localhost:8000
105105
- NODE_ENV=development
106-
106+
command:
107+
- bun
108+
- run
109+
- dev
110+
- "--host"
111+
- "--port"
112+
- "80"
113+
develop:
114+
watch:
115+
- path: ./frontend
116+
action: sync
117+
target: /app/frontend
118+
ignore:
119+
- ./frontend/node_modules
120+
- node_modules
121+
- path: ./frontend/package.json
122+
action: rebuild
107123
playwright:
108124
build:
109125
context: .

frontend/Dockerfile.dev

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Stage 0, "build-stage", based on Bun, to build and compile the frontend
2+
FROM oven/bun:1 AS build-stage
3+
4+
WORKDIR /app
5+
6+
COPY package.json bun.lock /app/
7+
8+
COPY frontend/package.json /app/frontend/
9+
10+
WORKDIR /app/frontend
11+
12+
RUN bun install
13+
14+
COPY ./frontend /app/frontend
15+
ARG VITE_API_URL

0 commit comments

Comments
 (0)