Skip to content

Commit

Permalink
FIX: Deploy to Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheila-nk committed Jun 13, 2024
1 parent fe9910d commit 7055877
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 65 deletions.
44 changes: 11 additions & 33 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,18 @@ name: Deploy to Heroku

on:
push:
branches: [ main ]

workflow_dispatch:
branches:
- main

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to the Heroku Container Registry
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
echo $HEROKU_API_KEY | docker login --username=_ --password-stdin registry.heroku.com
- name: Build Docker image
env:
AT_USERNAME: "sandbox"
AT_API_KEY: ${{ secrets.AT_API_KEY }}
PG_USER: ${{ secrets.PG_USER }}
PG_PASSWORD: ${{ secrets.PG_PASSWORD }}
PG_DB: ${{ secrets.PG_DB }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
OAUTH_CLIENT_ID: ${{ secrets.OAUTH_CLIENT_ID }}
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}
run: |
docker-compose -f "compose.yaml" build
- name: Push container to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
heroku container:push api --app customer-orders-service
heroku container:release api --app customer-orders-service
- uses: actions/checkout@v2
- name: Deploy to Heroku
uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "customer-orders-service"
heroku_email: "[email protected]"
usedocker: true
31 changes: 0 additions & 31 deletions compose.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion customer_orders_service/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ApplicationConfig:
SECRET_KEY = os.environ.get('SECRET_KEY')
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ECHO = True
SQLALCHEMY_DATABASE_URI = os.environ.get('SQLALCHEMY_DATABASE_URI')
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL').replace("://", "ql://", 1)
GOOGLE_CLIENT_ID = os.environ.get('OAUTH_CLIENT_ID')
GOOGLE_CLIENT_SECRET = os.environ.get('OAUTH_CLIENT_SECRET')
GOOGLE_DISCOVERY_URL = "https://accounts.google.com/.well-known/openid-configuration"
Expand Down

0 comments on commit 7055877

Please sign in to comment.