Skip to content

Commit aad14d8

Browse files
committed
Fix Dockerfile paths and streamline deployment workflow
- Updated paths in the Dockerfile to correctly reference the `recordprocessor` directory for Poetry files and source code. - Adjusted the deployment workflow to ensure the Docker build command points to the correct location of the Dockerfile, enhancing the image build process.
1 parent 142de41 commit aad14d8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/deploy-backend.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ jobs:
9393
9494
if ! aws ecr describe-repositories --repository-names "${REPOSITORY_NAME}" --region "${AWS_REGION}" >/dev/null 2>&1; then
9595
echo "ECR repository ${REPOSITORY_NAME} does not exist; creating now..."
96-
aws ecr create-repository --repository-name "${REPOSITORY_NAME}" --region "${AWS_REGION}"
96+
aws ecr.create-repository --repository-name "${REPOSITORY_NAME}" --region "${AWS_REGION}"
9797
fi
9898
9999
IMAGE_URI="${ECR_REGISTRY}/${REPOSITORY_NAME}:${IMAGE_TAG}"
100100
101-
docker build -f lambdas/recordprocessor/Dockerfile -t "${IMAGE_URI}" .
101+
docker build -f recordprocessor/Dockerfile -t "${IMAGE_URI}" lambdas
102102
docker push "${IMAGE_URI}"
103103
104104
echo "image_tag=${IMAGE_TAG}" >> "$GITHUB_OUTPUT"

lambdas/recordprocessor/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN mkdir -p /home/appuser && \
77
chown -R 1001:1001 /home/appuser && pip install "poetry~=2.1.4"
88

99
# Copy recordprocessor Poetry files
10-
COPY ./lambdas/recordprocessor/poetry.lock ./lambdas/recordprocessor/pyproject.toml ./
10+
COPY ./recordprocessor/poetry.lock ./recordprocessor/pyproject.toml ./
1111

1212
# Install dependencies
1313
WORKDIR /var/task
@@ -17,10 +17,10 @@ RUN poetry config virtualenvs.create false && poetry install --no-interaction --
1717
FROM base AS build
1818

1919
# Copy shared source code
20-
COPY ./lambdas/shared/src/common ./common
20+
COPY ./shared/src/common ./common
2121

2222
# Copy recordprocessor source code
23-
COPY ./lambdas/recordprocessor/src .
23+
COPY ./recordprocessor/src .
2424

2525
# Set correct permissions
2626
RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)

0 commit comments

Comments
 (0)