File tree Expand file tree Collapse file tree 2 files changed +24
-8
lines changed
Expand file tree Collapse file tree 2 files changed +24
-8
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,9 @@ resource "aws_ecr_repository" "mesh_file_converter_lambda_repository" {
3333module "mesh_processor_docker_image" {
3434 count = var. create_mesh_processor ? 1 : 0
3535
36- source = " terraform-aws-modules/lambda/aws//modules/docker-build"
37- version = " 8.1.2"
36+ source = " terraform-aws-modules/lambda/aws//modules/docker-build"
37+ version = " 8.1.2"
38+ docker_file_path = " ./mesh_processor/Dockerfile"
3839
3940 create_ecr_repo = false
4041 ecr_repo = aws_ecr_repository. mesh_file_converter_lambda_repository [0 ]. name
@@ -57,9 +58,10 @@ module "mesh_processor_docker_image" {
5758
5859 platform = " linux/amd64"
5960 use_image_tag = false
60- source_path = local . mesh_processor_lambda_dir
61+ source_path = abspath ( " ${ path . root } /../../lambdas " )
6162 triggers = {
62- dir_sha = local.mesh_processor_lambda_dir_sha
63+ dir_sha = local.mesh_processor_lambda_dir_sha
64+ shared_dir_sha = local.shared_dir_sha
6365 }
6466}
6567
Original file line number Diff line number Diff 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
1215RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi --no-root --only main
1316
14-
1517# -----------------------------
1618FROM 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
1930RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
31+
2032# Switch to the non-root user for running the container
2133USER 1001:1001
34+
35+ # Set the Lambda handler
2236CMD ["converter.lambda_handler" ]
You can’t perform that action at this time.
0 commit comments