3
3
ARG PUSH_SENTRY_RELEASE="false"
4
4
5
5
# Build step #1: build the React front end
6
- FROM node:22 -alpine AS build-step
6
+ FROM node:23 -alpine AS build-step
7
7
ARG SENTRY_RELEASE=""
8
8
WORKDIR /app
9
9
ENV PATH=/app/node_modules/.bin:$PATH
10
10
COPY craco.config.js package.json package-lock.json tsconfig.json tsconfig.paths.json .env.production* ./
11
11
COPY ./src ./src
12
12
COPY ./public ./public
13
13
COPY ./config ./config
14
-
15
14
RUN npm install
16
15
RUN touch .env.production
17
16
ENV REACT_APP_SENTRY_RELEASE=$SENTRY_RELEASE
@@ -31,17 +30,23 @@ RUN sentry-cli releases finalize ${SENTRY_RELEASE}
31
30
RUN touch sentry
32
31
33
32
# Build step #3: build the API with the client as static files
34
- FROM python:3.13 AS false
33
+ FROM python:3.13-alpine AS api-build
35
34
ARG SENTRY_RELEASE=""
36
35
WORKDIR /app
37
- COPY --from=build-step /app/build ./build
38
36
37
+ # Install pipx and ensure the path is set correctly
38
+ RUN apk add --no-cache python3 py3-pip py3-virtualenv
39
+ RUN pip install --no-cache-dir pipx && python3 -m pipx ensurepath
40
+
41
+ COPY --from=build-step /app/build ./build
39
42
RUN rm ./build/static/js/*.map
40
43
RUN mkdir ./api && mkdir ./migrations
41
44
COPY requirements.txt api/ ./api/
42
45
COPY migrations/ ./migrations/
43
46
COPY ./config ./config
44
- RUN pip install -r ./api/requirements.txt
47
+
48
+ # Use pipx to install dependencies
49
+ RUN pipx install -r ./api/requirements.txt
45
50
46
51
# Build an image that includes the optional sentry release push build step
47
52
FROM false AS true
0 commit comments