From 8e22597f19ea1ca6b45ce24a729fdc2a5ae77d4e Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Fri, 19 Apr 2024 00:35:47 +0200 Subject: [PATCH] same again with dynamodb. --- .github/workflows/build.yml | 27 +++++++++++++++++++ .github/workflows/dynamodb.yml | 48 ++++++++++++++++++++++++++++++++++ dynamodb/Dockerfile | 4 +++ dynamodb/docker-compose.yml | 4 +++ 4 files changed, 83 insertions(+) create mode 100644 .github/workflows/dynamodb.yml create mode 100644 dynamodb/Dockerfile create mode 100644 dynamodb/docker-compose.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba076db..444e987 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,3 +134,30 @@ jobs: permissions: contents: read packages: write + + dynamodb: + needs: qc-before + name: DynamoDB Dev Container + uses: ./.github/workflows/dynamodb.yml + secrets: inherit + permissions: + contents: read + packages: write + + minio: + needs: qc-before + name: Minio Dev Container + uses: ./.github/workflows/minio.yml + secrets: inherit + permissions: + contents: read + packages: write + + mongodb: + needs: qc-before + name: MongoDB Dev Container + uses: ./.github/workflows/mongodb.yml + secrets: inherit + permissions: + contents: read + packages: write diff --git a/.github/workflows/dynamodb.yml b/.github/workflows/dynamodb.yml new file mode 100644 index 0000000..d1a9489 --- /dev/null +++ b/.github/workflows/dynamodb.yml @@ -0,0 +1,48 @@ +name: DynamoDB + +permissions: + contents: read + packages: write + +on: + workflow_call: + workflow_dispatch: + +jobs: + dynamodb-build: + name: "Build" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + sparse-checkout: dynamodb + + - uses: docker/setup-qemu-action@v3 + + - uses: docker/setup-buildx-action@v2 + + - name: "Setup: Login to Docker Hub" + uses: docker/login-action@v3 + with: + username: matthewbaggett + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + + - name: "Setup: Login to GHCR" + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: matthewbaggett + password: ${{ secrets.GHCR_PASSWORD }} + + - uses: docker/build-push-action@v5 + name: Build & Push + with: + context: dynamodb + platforms: linux/amd64,linux/arm64 + pull: true + push: true + tags: | + gone/dynamodb + benzine/dynamodb + ghcr.io/benzine-framework/dynamodb diff --git a/dynamodb/Dockerfile b/dynamodb/Dockerfile new file mode 100644 index 0000000..aaa38f1 --- /dev/null +++ b/dynamodb/Dockerfile @@ -0,0 +1,4 @@ +FROM amazon/dynamodb-local +HEALTHCHECK --interval=5s --timeout=3s --start-period=0s --retries=5 \ + CMD curl --silent --output /dev/null http://localhost:8000/shell/ +CMD ["-jar", "DynamoDBLocal.jar", "-sharedDb", "-dbPath", "/tmp"] diff --git a/dynamodb/docker-compose.yml b/dynamodb/docker-compose.yml new file mode 100644 index 0000000..ebf4977 --- /dev/null +++ b/dynamodb/docker-compose.yml @@ -0,0 +1,4 @@ +version: "3.7" +services: + dynamodb: + build: .