1

As showcase and demo version I want to run a matterbrige within the free plan of heroku. For this i found this nice repository from patcon. He forked it and improved it in my eyes by explaning how you run it as web dyno in a permanent way and so it also accepts hhtp requests like webhooks. For deploying the app I decided to take the git push method.

I have cloned the repo from patcon to my windows machine, configured it to my needs and pushed it to heroku. In the beginning this was not working because the build environment did not detect the buildpack. So I set the Environment Variable BUILDPACKS_URL to https://github.com/patcon/matterbridge-heroku#master

Afterwards the build was sucessfull, but there were multiple problems. Within the logs it was mentioned, that the permission for executing start.sh and envsubst is denied. Like in the docs from Heroku mentioned, I created the .profile file with chmod +x for start.sh and lib/envsubst.

So git is converting line ending from the windows format to the linux one. But not the permissions. In the end I don't know if the download is working.

Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Writing objects: 100% (3/3), 318 bytes | 318.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Matterbridge app detected
remote: -----> Downloading Matterbridge: https://github.com/42wim/matterbridge/releases/download/v1.17.5/matterbridge-linux-amd64
remote: -----> Discovering process types
remote:
remote: -----> Compressing...
remote: -----> Launching...
remote:        Released v35
remote:        https://???.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.

But even if I change within the bin/compile file the path and version of the download, it always downloads the version v1.17.5. Also if I change it with app.json. To be honest I have only a guess what this file does. I guess it is if used when I want to deploy an app via this heroku button method to set the environment variables.

The following message indicates for me, that the matterbridge executeable is not downloaded or not in the right place.

2020-06-19T17:37:13.074592+00:00 app[web.1]: [heroku-exec] Starting
2020-06-19T17:37:13.116550+00:00 app[web.1]: ./matterbridge: line 1: Not: command not found
2020-06-19T17:37:13.181167+00:00 heroku[web.1]: Process exited with status 127
2020-06-19T17:37:13.214787+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-19T19:10:11.450748+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-19T19:10:11.759082+00:00 heroku[web.1]: Starting process with command `./start.sh`
2020-06-19T19:10:14.649261+00:00 app[web.1]: [heroku-exec] Starting
2020-06-19T19:10:14.671276+00:00 app[web.1]: ./matterbridge: line 1: Not: command not found
2020-06-19T19:10:14.732134+00:00 heroku[web.1]: Process exited with status 127
2020-06-19T19:10:14.787002+00:00 heroku[web.1]: State changed from starting to crashed

I tried to look via heroku ps:exec if i can see the folder structure. But because the dyno exits after the failure that is not possible. And I also tried to run heroku local to see if the app is build localy. But it is not.

Like I explained earlier while the push and the pre-build it does not download the other versions when I configure it I guessed that there is an over good meant caching activated. So I tried to clean the cache with heroku repo:purge_cache.

Can anyone help me or give me a hinter. Thanks in advance

WebMacke
  • 11
  • 1

1 Answers1

0

ohai! I found this while unrelatedly searching for "envsubst heroku" on google, but then saw my name and decided to click through :) kinda wild...!

Anyhow, I think your issue is that I hardcoded the download url based on an old format of naming the binary assets that 42wim was using:

https://github.com/42wim/matterbridge/releases/download/vX.Y.Z/matterbridge-linux-amd64

and it seems he's now using:

https://github.com/42wim/matterbridge/releases/download/vX.Y.Z/matterbridge-X.Y.Z-linux-amd64

So just hardcoding the direct download link or making a fix to the buildpack should work (backward compat would mean finding where the name change started, which should be sometime after Dec 2018 when I was working on this)

patcon
  • 1,677
  • 1
  • 12
  • 9