mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-30 10:29:09 +00:00
Update Dockerfile
This commit is contained in:
@@ -13,6 +13,19 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Docker Compose
|
||||
run: |
|
||||
python3 -m pip install docker-compose
|
||||
|
||||
- name: Install AWS CLI
|
||||
run: |
|
||||
python3 -m pip install awscli
|
||||
.
|
||||
- name: Configure AWS Region
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Extract Environment
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -23,24 +36,15 @@ jobs:
|
||||
fi
|
||||
id: extract_environment
|
||||
|
||||
- name: Configure AWS Region
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-region: us-east-1
|
||||
|
||||
- name: Install AWS CLI
|
||||
run: |
|
||||
python3 -m pip install awscli
|
||||
|
||||
- name: Login to AWS ECR
|
||||
id: login_ecr
|
||||
uses: aws-actions/amazon-ecr-login@v1
|
||||
|
||||
- name: Build, Tag, and Push Image to AWS ECR
|
||||
env:
|
||||
ECR_REGISTRY: ${{ steps.login_ecr.outputs.registry }}
|
||||
ECR_REPOSITORY: microservices/maestro_${{ steps.extract_environment.outputs.result }}
|
||||
IMAGE_TAG: latest
|
||||
ENV: ${{ steps.extract_environment.outputs.result }}
|
||||
run: |
|
||||
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
export ENV=$ENV
|
||||
docker-compose build
|
||||
docker-compose push
|
||||
|
||||
Reference in New Issue
Block a user