Skip to content

Commit c5ffd6a

Browse files
committed
Adjust dockerfile for new paths
1 parent c40e4d1 commit c5ffd6a

File tree

2 files changed

+13
-65
lines changed

2 files changed

+13
-65
lines changed

lambdas/recordprocessor/Dockerfile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,25 @@ RUN mkdir -p /home/appuser && \
66
echo 'appuser:x:1001:' >> /etc/group && \
77
chown -R 1001:1001 /home/appuser && pip install "poetry~=2.1.4"
88

9-
# Install Poetry as root
10-
COPY poetry.lock pyproject.toml README.md ./
11-
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main
9+
# Copy recordprocessor Poetry files
10+
COPY ./recordprocessor/poetry.lock ./recordprocessor/pyproject.toml ./
1211

13-
# -----------------------------
14-
FROM base AS test
15-
COPY src src
16-
COPY tests tests
17-
RUN poetry install --no-interaction --no-ansi --no-root && \
18-
pytest --disable-warnings tests
12+
# Install dependencies
13+
WORKDIR /var/task
14+
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main
1915

2016
# -----------------------------
2117
FROM base AS build
2218

23-
COPY src .
19+
# Copy shared source code
20+
COPY ./shared/src/common ./common
21+
22+
# Copy recordprocessor source code
23+
COPY ./recordprocessor/src .
24+
25+
# Set correct permissions
2426
RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
27+
2528
# Switch to the non-root user for running the container
2629
USER 1001:1001
2730
CMD ["python", "batch_processor.py"]

lambdas/shared/src/common/junk.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)