From cd258b51ae0bdabcdabd16b3f29f0bbf6a4ebc39 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Tue, 14 Jan 2025 12:10:52 +0000 Subject: [PATCH] Removed files from failed AWS compose deploy strategy --- apprunner.yaml | 16 ---------------- buildspec.yaml | 31 ------------------------------- 2 files changed, 47 deletions(-) delete mode 100644 apprunner.yaml delete mode 100644 buildspec.yaml diff --git a/apprunner.yaml b/apprunner.yaml deleted file mode 100644 index 83c41b2..0000000 --- a/apprunner.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: 1.0 -build: - commands: - pre-build: - - sudo mkdir -p /usr/local/lib/docker/cli-plugins/ - - sudo curl -SL https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose - - sudo chmod +x /usr/local/bin/docker-compose - - docker-compose --version - build: - - sudo docker-compose build -run: - runtime: guest - command: sudo docker-compose up - network: - port: 8080 - protocol: tcp diff --git a/buildspec.yaml b/buildspec.yaml deleted file mode 100644 index a7c1993..0000000 --- a/buildspec.yaml +++ /dev/null @@ -1,31 +0,0 @@ -version: 0.2 - -phases: - pre_build: - commands: - - echo Logging in to Amazon ECR... - - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com - - REPOSITORY_URI=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME - - COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7) - - IMAGE_TAG=${COMMIT_HASH:=latest} - build: - commands: - - echo Build started on `date` - - echo Building the Docker image... - - docker-compose build - - docker tag $IMAGE_REPO_NAME:latest $REPOSITORY_URI:$IMAGE_TAG - post_build: - commands: - - echo Build completed on `date` - - echo Pushing the Docker image... - - docker push $REPOSITORY_URI:$IMAGE_TAG - - echo Writing image definitions file... - - printf '[{"name":"container-name","imageUri":"%s"}]' $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json - - echo Converting Docker Compose to CloudFormation... - - docker context create ecs myecscontext - - docker context use myecscontext - - docker compose convert > cloudformation-template.json -artifacts: - files: - - imagedefinitions.json - - cloudformation-template.json