Hi There,
I’m trying to get a continuous deployment happening with docker compose and CircleCi. I have the following circle.yml and my AWS environment variables in under “Environment Variables”. I still keep getting the error: You must specify a region. You can also configure your region by running “aws configure”.
Exited with code 255
Not sure what else I need to configure here. Any assistance is really appreciated…
version: 2
jobs:
build:
working_directory: /app
docker:
- image: docker:17.05.0-ce-git
steps:
- checkout
- setup_remote_docker
- run:
name: Install dependencies
command: |
apk add --no-cache
py-pip=9.0.0-r1
pip install
docker-compose==1.12.0
awscli==1.11.76
- restore_cache:
keys:
- v1-{{ .Branch }}
paths:
- /caches/app.tar
- run:
name: Load Docker image layer cache
command: |
set +o pipefail
docker load -i /caches/app.tar | true
- run:
name: Build application Docker image
command: |
docker build --cache-from=app -t app .
- run:
name: Save Docker image layer cache
command: |
mkdir -p /caches
docker save -o /caches/app.tar app
- save_cache:
key: v1-{{ .Branch }}-{{ epoch }}
paths:
- /caches/app.tar
- run:
name: Run tests
command: |
docker-compose -f ./docker-compose.test.yml up
- deploy:
name: Push application Docker image
command: |
if [ “{CIRCLE_BRANCH}" == "master" ]; then
login="(aws ecr get-login)”
{login}
docker tag app "{ECR_ENDPOINT}/app:{CIRCLE_SHA1}"
docker push "{ECR_ENDPOINT}/app:${CIRCLE_SHA1}"
fi