Skip to content

Commit

Permalink
I'm going to try to use docker-compose-production.yml to build my ima…
Browse files Browse the repository at this point in the history
…ges. The tag, push, and release them to Heroku
  • Loading branch information
kenlight-bu committed Sep 27, 2024
1 parent 4f76ef5 commit 720c9c8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ name: Deploy to Heroku
on:
push:
branches:
- HW-166-add-tests-to-docker-container # Set this to the branch you want to trigger deployment
- HW-166-add-tests-to-docker-container # Branch to trigger deployment

jobs:
deploy:
runs-on: ubuntu-latest
env:
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }}
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_APP_NAME_CLIENT: ${{ secrets.HEROKU_APP_NAME_CLIENT }}
HEROKU_APP_NAME_SERVER: ${{ secrets.HEROKU_APP_NAME_SERVER }}
HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }} # Your Heroku app name

steps:
- name: Check out repository
Expand All @@ -25,20 +24,21 @@ jobs:
run: |
echo "$HEROKU_API_KEY" | docker login --username="$HEROKU_EMAIL" --password-stdin registry.heroku.com
- name: Build and Push Client Image to Heroku Container Registry
- name: Build Images Using Docker Compose
run: |
docker build -t registry.heroku.com/peak-performance/web -f code/client/Dockerfile.production ./code
docker push registry.heroku.com/peak-performance/web
docker-compose -f code/docker-compose-production.yml build
- name: Build and Push Server Image to Heroku Container Registry
- name: Tag and Push API Image to Heroku Container Registry
run: |
docker build -t registry.heroku.com/peak-performance/web -f code/server/Dockerfile.production ./code
docker push registry.heroku.com/peak-performance/web
docker tag api-production:latest registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
docker push registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
- name: Release Client on Heroku
- name: Tag and Push Client Image to Heroku Container Registry
run: |
heroku container:release web --app peak-performance
docker tag client-production:latest registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
docker push registry.heroku.com/${{ env.HEROKU_APP_NAME }}/web
- name: Release Server on Heroku
- name: Release on Heroku
run: |
heroku container:release web --app peak-performance
heroku container:release web --app ${{ env.HEROKU_APP_NAME }}

0 comments on commit 720c9c8

Please sign in to comment.