Skip to content

Commit b56bb21

Browse files
Merge branch 'feature/local_automation_enhancements' of https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator into feature/local_automation_enhancements
2 parents 7235e80 + 12c3c8f commit b56bb21

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

src/App/Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ WORKDIR /app/frontend
88
# Copy package files first for better caching
99
COPY package*.json ./
1010

11-
# Install dependencies
12-
RUN npm ci --silent
11+
# Install dependencies once (cached unless package*.json changes)
12+
# npm rebuild esbuild --force ensures the correct platform binary inside the Linux image
13+
RUN npm ci && npm rebuild esbuild --force
1314

14-
# Copy source files
15+
# Copy source files (node_modules excluded by .dockerignore)
1516
COPY . ./
1617

17-
RUN rm -rf node_modules && npm ci && npm rebuild esbuild --force
18-
1918
# Build the React app
2019
RUN npm run build
2120

@@ -34,8 +33,7 @@ WORKDIR /app
3433
COPY pyproject.toml requirements.txt* uv.lock* ./
3534

3635
# Install Python dependencies using UV
37-
RUN --mount=type=cache,target=/root/.cache/uv \
38-
if [ -f "requirements.txt" ]; then \
36+
RUN if [ -f "requirements.txt" ]; then \
3937
uv pip install --system -r requirements.txt && uv pip install --system "uvicorn[standard]"; \
4038
else \
4139
uv pip install --system pyproject.toml && uv pip install --system "uvicorn[standard]"; \

src/backend/Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@ ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
88

99
WORKDIR /app
1010

11+
# Copy lock and project files first for better layer caching
12+
COPY uv.lock pyproject.toml /app/
13+
1114
# Install the project's dependencies using the lockfile and settings
12-
RUN --mount=type=cache,target=/root/.cache/uv \
13-
--mount=type=bind,source=uv.lock,target=uv.lock \
14-
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
15-
uv sync --frozen --no-install-project --no-dev
16-
#RUN uv sync --frozen --no-install-project --no-dev
15+
RUN uv sync --frozen --no-install-project --no-dev
1716

1817
# Backend app setup
1918
COPY . /app
20-
RUN --mount=type=cache,target=/root/.cache/uv uv sync --frozen --no-dev
21-
#RUN uv sync --frozen --no-dev
19+
RUN uv sync --frozen --no-dev
2220

2321

2422
FROM base

0 commit comments

Comments
 (0)