Closed DCNick3 closed 2 years ago
Seems that some user has already experienced this error in dokku/dokku#3253
I forked this repo and did the suggestions above however this does mess with the working directory which will likely break apps.
Adding something like Directory.SetCurrentDirectory(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
to the entry point resolves this but it is still a breaking change so it's probably not worth a PR here. As suggested above the best solution is for herokuish to change how they handle Procfile execution.
I've also tried playing around with bash -c 'command'
, but it didn't work for some reason (maybe I am stupid or shell escaping gone haywire)
web: $HOME/heroku_output/app_executable
worked for me because I don't care about the working directory, but yeah, if you need it - you can change it in C# as a workaround
Hello @DCNick3 @jrhodnik
I've done some changes
Could you please check does it work for you?
heroku config:set HEROKUISH=true
heroku buildpacks:set https://github.com/jincod/dotnetcore-buildpack#feature/herokuish
Just got a chance to test this. Here's the result. Is this my environment, or something else maybe?
remote: Add web process to Procfile
remote: Override Procfile for herokuish
remote: Using release configuration from last framework (ASP.NET Core).
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote: -----> Releasing rap-master...
remote: -----> Checking for predeploy task
remote: No predeploy task found, skipping
remote: -----> Checking for release task
remote: ! process names must be unique, line 2
remote: 2021/10/07 22:06:32 exit status 1
remote: -----> App Procfile file found
remote: No release task found, skipping
remote: -----> App Procfile file found
remote: ! process names must be unique, line 2
remote: 2021/10/07 22:06:36 exit status 1
remote: ! exit status 1
remote: 2021/10/07 22:06:36 exit status 1
remote: 2021/10/07 22:06:36 exit status 1
remote: 2021/10/07 22:06:36 exit status 1
Thank you @jrhodnik
It should be fixed now
It does seem to work now! Still requires the little hack regarding changing working directories above, however I'm not sure there's much we can do about that without actual access to cd
.
Thank you, @jincod !
Herokuish is an implementation of heroku buildpacks logic used, for example, in Dokku - a self-hosted PaaS providing similar features to heroku.
This buildpack seems to work fine with it, but, unfortunately, it uses exec to run the command that is put in
Procfile
, which fails miserably when used withProcfile
generated by this project, containing something likecd $HOME/heroku_output && ./app_executable
. If it is replaced with$HOME/heroku_output/app_executable
- it works fine.I think it might be a good idea to change it so that it will work with herokuish and dokku.
As a workaround one can use custom Procfile with something like
web: $HOME/heroku_output/app_executable
in it.