Skip to content

Commit

Permalink
Fix incorrect APP_PATH in docker build command
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke-Rogerson committed Apr 10, 2024
1 parent 17b097c commit 5298993
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/actions/build-push-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ runs:
- name: Build Docker Image for Server
shell: bash
run: |
docker build --build-arg APP_PATH=./cmd/order-book -t registry.heroku.com/$HEROKU_APP_NAME/$HEROKU_APP_TYPE -f cmd/order-book.Dockerfile .
if [ "$HEROKU_APP_TYPE" == "web" ]; then
APP_PATH="./cmd/order-book"
elif [ "$HEROKU_APP_TYPE" == "worker" ]; then
APP_PATH="./cmd/pending-swaps-tracker"
else
echo "Invalid Heroku app type specified"
exit 1
fi
docker build --build-arg APP_PATH=$APP_PATH -t registry.heroku.com/$HEROKU_APP_NAME/$HEROKU_APP_TYPE -f cmd/order-book.Dockerfile .
env:
HEROKU_APP_NAME: ${{ inputs.heroku_app_name }}
HEROKU_APP_TYPE: ${{ inputs.heroku_app_type }}
Expand Down
2 changes: 2 additions & 0 deletions cmd/order-book/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func main() {
}

func setup() {
log.Printf("Starting server...")

redisAddress, found := os.LookupEnv("REDIS_URL")
if !found {
redisAddress, found = os.LookupEnv("REDISCLOUD_URL")
Expand Down
2 changes: 2 additions & 0 deletions cmd/pending-swaps-tracker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
var defaultDuration = 10 * time.Second

func main() {
log.Printf("Starting pending swaps tracker...")

redisAddress, found := os.LookupEnv("REDIS_URL")
if !found {
panic("REDIS_URL not set")
Expand Down

0 comments on commit 5298993

Please sign in to comment.