Skip to content

Commit

Permalink
Merge 9f1e10b into 78fe0ba
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpearce-digital authored Feb 10, 2025
2 parents 78fe0ba + 9f1e10b commit 1fca714
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ services:
build:
context: ..
dockerfile: docker/localstack/Dockerfile
platforms:
- linux/amd64
- linux/arm64
depends_on:
opensearch:
condition: service_healthy
Expand Down
6 changes: 3 additions & 3 deletions docker/localstack/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -o cmd/schedule
&& chmod 755 cmd/scheduled-task-adder/bootstrap \
&& zip -r -j scheduled-task-adder.zip cmd/scheduled-task-adder/bootstrap

FROM --platform=${TARGETARCH} localstack/localstack:4.1.1 AS localstack
FROM localstack/localstack:4.1.1 AS localstack

COPY --from=build /app/event-received.zip /etc/event-received.zip
COPY --from=build /app/schedule-runner.zip /etc/schedule-runner.zip
COPY --from=build /app/scheduled-task-adder.zip /etc/scheduled-task-adder.zip

COPY ./docker/localstack/localstack-init.sh /etc/localstack/init/ready.d/localstack-init.sh
COPY ./docker/localstack/dynamodb-lpa-gsi-schema.json ./dynamodb-lpa-gsi-schema.json
COPY ./docker/localstack/schedule-runner-metrics-query.json ./schedule-runner-metrics-query.json
COPY ./docker/localstack/dynamodb-lpa-gsi-schema.json /usr/dynamodb-lpa-gsi-schema.json
COPY ./docker/localstack/schedule-runner-metrics-query.json /usr/schedule-runner-metrics-query.json

RUN chmod 544 /etc/localstack/init/ready.d/localstack-init.sh
4 changes: 2 additions & 2 deletions docker/localstack/localstack-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ awslocal dynamodb create-table \
--attribute-definitions AttributeName=PK,AttributeType=S AttributeName=SK,AttributeType=S AttributeName=LpaUID,AttributeType=S AttributeName=UpdatedAt,AttributeType=S \
--key-schema AttributeName=PK,KeyType=HASH AttributeName=SK,KeyType=RANGE \
--provisioned-throughput ReadCapacityUnits=1000,WriteCapacityUnits=1000 \
--global-secondary-indexes file://dynamodb-lpa-gsi-schema.json
--global-secondary-indexes file:///usr/dynamodb-lpa-gsi-schema.json

awslocal dynamodb create-table \
--region eu-west-1 \
--table-name lpas-test \
--attribute-definitions AttributeName=PK,AttributeType=S AttributeName=SK,AttributeType=S AttributeName=LpaUID,AttributeType=S AttributeName=UpdatedAt,AttributeType=S \
--key-schema AttributeName=PK,KeyType=HASH AttributeName=SK,KeyType=RANGE \
--provisioned-throughput ReadCapacityUnits=1000,WriteCapacityUnits=1000 \
--global-secondary-indexes file://dynamodb-lpa-gsi-schema.json
--global-secondary-indexes file:///usr/dynamodb-lpa-gsi-schema.json

echo 'creating bucket'
awslocal s3api create-bucket --bucket evidence --create-bucket-configuration LocationConstraint=eu-west-1
Expand Down

0 comments on commit 1fca714

Please sign in to comment.