Skip to content

Commit 01d93bf

Browse files
authored
Merge pull request #7 from aws-samples/fix/react-build
fixes missing react build output from container
2 parents e285ee6 + bfed7cc commit 01d93bf

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

web/Dockerfile.ci

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
FROM public.ecr.aws/docker/library/python:3.12-slim
1+
# Build stage for React app
2+
FROM node:22-alpine AS react-builder
3+
WORKDIR /build/voice-interview-react
4+
COPY ./web/voice-interview-react/package*.json ./
5+
RUN npm ci
6+
COPY ./web/voice-interview-react/ ./
7+
RUN npm run build
8+
9+
# Final stage
10+
FROM public.ecr.aws/docker/library/python:3.13-slim
211

312
WORKDIR /app
413
RUN apt-get update && apt-get install -y \
@@ -17,6 +26,9 @@ ENV FLASK_DEBUG=0
1726
COPY ./shared/ ./shared/
1827
COPY ./web/ ./web/
1928

29+
# Copy compiled React files from build stage
30+
COPY --from=react-builder /build/static/js/voice-interface.js* ./web/static/js/
31+
2032
WORKDIR /app/web
2133
EXPOSE 8080
2234
CMD ["gunicorn", \

0 commit comments

Comments
 (0)