mirror of
https://github.com/Cian-H/am-d-model.eu.git
synced 2025-12-22 21:41:57 +00:00
Removed files from failed AWS compose deploy strategy
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user