removed migration from dockerfile #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: [ "eks" ] | |
jobs: | |
build-api: | |
name: Build API Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure AWS ECR credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{secrets.AWS_REGION}} | |
- name: Login to Amazon ECR | |
id: login-aws-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Build and push API image to ECR | |
env: | |
ECR_REGISTRY: ${{ steps.login-aws-ecr.outputs.registry }} | |
ECR_REPOSITORY: ${{secrets.API_IMAGE_REPO}} | |
IMAGE_TAG: latest | |
run: | | |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG ./api | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |
build-frontend: | |
name: Build Frontend Docker Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure AWS ECR credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{secrets.AWS_REGION}} | |
- name: Login to Amazon ECR | |
id: login-aws-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Build and push Frontened image to ECR | |
env: | |
ECR_REGISTRY: ${{ steps.login-aws-ecr.outputs.registry }} | |
ECR_REPOSITORY: ${{secrets.FRONTEND_IMAGE_REPO}} | |
IMAGE_TAG: latest | |
run: | | |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG ./frontend | |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | |