Merge pull request #3 from dadosfera/ci/cd

Adding Deploy AWS Beanstalk
This commit is contained in:
Alexsander Pereira
2022-02-04 14:43:33 -03:00
committed by GitHub
4 changed files with 30 additions and 3 deletions
+20 -2
View File
@@ -54,5 +54,23 @@ jobs:
IMAGE_TAG: latest
run: |
export ENV=$ENV
docker-compose build
docker-compose push
docker-compose -f build.docker-compose.yml build
docker-compose -f build.docker-compose.yml push
- name: Create ZIP file to Deploy AWS Beanstalk
env:
ENV: ${{ steps.extract_environment.outputs.result }}
run: |
sed -i -e 's/${ENV}/$ENV/g' docker-compose.yml
zip deploy.zip docker-compose.yml
- name: Deploy AWS Beanstalk
env:
ENV: ${{ steps.extract_environment.outputs.result }}
AWS_REGION: us-east-1
APP_NAME: maestro
run: |
printf "n" | eb init $APP_NAME --region $AWS_REGION
eb use $APP_NAME-$ENV
echo -e "deploy:\n artifact: deploy.zip" >> .elasticbeanstalk/config.yml
eb deploy
+5
View File
@@ -36,3 +36,8 @@ lerna-debug.log*
# Ignore .env files
*.env
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml
+5
View File
@@ -0,0 +1,5 @@
version: "3.8"
services:
maestro:
build: .
image: 468720548566.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_${ENV}:latest
-1
View File
@@ -1,7 +1,6 @@
version: "3.8"
services:
maestro:
build: .
image: 468720548566.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_${ENV}:latest
container_name: maestro
restart: always