Skip to content

Commit 19ac699

Browse files
committed
VED-805: Fix MESH processor Dockerfile and Terraform.
1 parent 9b72ecc commit 19ac699

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

infrastructure/instance/mesh_processor.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ module "mesh_processor_docker_image" {
5757

5858
platform = "linux/amd64"
5959
use_image_tag = false
60-
source_path = local.mesh_processor_lambda_dir
60+
source_path = abspath("${path.root}/../../lambdas")
6161
triggers = {
62-
dir_sha = local.mesh_processor_lambda_dir_sha
62+
dir_sha = local.mesh_processor_lambda_dir_sha
63+
shared_dir_sha = local.shared_dir_sha
6364
}
6465
}
6566

lambdas/mesh_processor/Dockerfile

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

9+
# Install Poetry dependencies
10+
# Copy mesh_processor Poetry files
11+
COPY ./mesh_processor/poetry.lock ./mesh_processor/pyproject.toml ./mesh_processor/README.md ./
912

10-
11-
COPY poetry.lock pyproject.toml README.md ./
13+
# Install mesh_processor dependencies
14+
WORKDIR /var/task
1215
RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main
1316

14-
1517
# -----------------------------
1618
FROM base AS build
1719

18-
COPY src .
20+
# Set working directory back to Lambda task root
21+
WORKDIR /var/task
22+
23+
# Copy shared source code
24+
COPY ./shared/src/common ./common
25+
26+
# Copy mesh_processor source code
27+
COPY ./mesh_processor/src .
28+
29+
# Set correct permissions
1930
RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
31+
2032
# Switch to the non-root user for running the container
2133
USER 1001:1001
34+
35+
# Set the Lambda handler
2236
CMD ["converter.lambda_handler"]

0 commit comments

Comments
 (0)