Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 9 additions & 21 deletions .github/workflows/build-push-ecr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,30 @@ jobs:
- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Setup AWS Creds
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY_AWS }}
aws-secret-access-key: ${{ secrets.SECRET_KEY_AWS }}
aws-region: us-west-2

- name: login ECR
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
id: ecr-login
uses: aws-actions/amazon-ecr-login@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_TEAM_NAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Backend and and push
- name: Build Backend and push
if: github.event_name != 'pull_request'
env:
ECR_REGISTRY: ${{ steps.ecr-login.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.BACKEND_ECR_REPOSITORY }}
run: |
VERSION_TAG=$(echo "${{ github.ref }}" | cut -d'/' -f 3)
TAG=$ECR_REGISTRY/$ECR_REPOSITORY:${VERSION_TAG}
TAG=${{ secrets.DOCKERHUB_TEAM_NAME }}/${{ secrets.BACKEND_REPOSITORY }}:${VERSION_TAG}
docker build --platform linux/amd64 --push -t ${TAG} -f ${{ env.Dockerfile_Backend }} .

- name: Build Backend image
if: github.event_name == 'pull_request'
run: |
docker build --platform linux/amd64 -f ${{ env.Dockerfile_Backend }} .


- name: Build Web and and push
- name: Build Web and push
if: github.event_name != 'pull_request'
env:
ECR_REGISTRY: ${{ steps.ecr-login.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.WEB_ECR_REPOSITORY }}
run: |
VERSION_TAG=$(echo "${{ github.ref }}" | cut -d'/' -f 3)
TAG=$ECR_REGISTRY/$ECR_REPOSITORY:${VERSION_TAG}
TAG=${{ secrets.DOCKERHUB_TEAM_NAME }}/${{ secrets.WEB_REPOSITORY }}:${VERSION_TAG}
docker build --platform linux/amd64 --push -t ${TAG} -f ${{ env.Dockerfile_Web }} web/

- name: Build Web image
Expand Down
16 changes: 8 additions & 8 deletions deploy.docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ services:
- mynetwork

setup_db:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-backend:latest
image: drdroidlab/playbooks-backend:latest
platform: linux/amd64
command: ./setup_db.sh
environment:
Expand All @@ -62,7 +62,7 @@ services:
- mynetwork

server:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-backend:latest
image: drdroidlab/playbooks-backend:latest
platform: linux/amd64
command: ./start-server.sh
ports:
Expand Down Expand Up @@ -94,7 +94,7 @@ services:
- mynetwork

celery_worker:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-backend:latest
image: drdroidlab/playbooks-backend:latest
platform: linux/amd64
command: ./start-celery-worker.sh
environment:
Expand Down Expand Up @@ -122,7 +122,7 @@ services:
- mynetwork

workflow_scheduler_celery_worker:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-backend:latest
image: drdroidlab/playbooks-backend:latest
platform: linux/amd64
command: ./start-celery-worker.sh
environment:
Expand Down Expand Up @@ -151,7 +151,7 @@ services:
- mynetwork

workflow_executor_celery_worker:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-backend:latest
image: drdroidlab/playbooks-backend:latest
platform: linux/amd64
command: ./start-celery-worker.sh
environment:
Expand Down Expand Up @@ -180,7 +180,7 @@ services:
- mynetwork

workflow_action_execution_celery_worker:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-backend:latest
image: drdroidlab/playbooks-backend:latest
platform: linux/amd64
command: ./start-celery-worker.sh
environment:
Expand Down Expand Up @@ -209,7 +209,7 @@ services:
- mynetwork

celery_beat:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-backend:latest
image: drdroidlab/playbooks-backend:latest
platform: linux/amd64
command: ./start-celery-beat.sh
environment:
Expand Down Expand Up @@ -237,7 +237,7 @@ services:
- mynetwork

web:
image: public.ecr.aws/y9s1f3r5/drdroid/playbooks-web:latest
image: drdroidlab/playbooks-web:latest
platform: linux/amd64
environment:
- VITE_REACT_APP_POSTHOG_ENABLED=true
Expand Down