Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom Procfile #27

Closed
jincod opened this issue Nov 22, 2017 · 19 comments
Closed

Support custom Procfile #27

jincod opened this issue Nov 22, 2017 · 19 comments

Comments

@jincod
Copy link
Owner

jincod commented Nov 22, 2017

No description provided.

@WilhelmKleuSage
Copy link

Opened a PR with basic functionality for this: #28
Please have a look.

@jincod
Copy link
Owner Author

jincod commented Dec 8, 2017

Hi @WilhelmKleuSage

Thank you for your contribution!

I'll review it

@WilhelmKleuSage
Copy link

Great. Thanks.
I just noticed a few issues (publishing everything to a single directory). I am going to change it to publish each one independently and then also automatically add the cd to heroku_output.

@JulienAmbos
Copy link

Are you still working on this, or is there a workaround to support different environments?

@jincod
Copy link
Owner Author

jincod commented Jun 30, 2018

Hi @JA-AmbosImmo

I don't have enough time to test it.

What do you mean support different environments?

@JulienAmbos
Copy link

Since the procfile configuration is overwritten during build, I cannot add the asp environment variable. Is there a workaround to do this? I cannot use appsettings.json in different environments because in heroku the environment variable can only be set to production as default

@jincod
Copy link
Owner Author

jincod commented Jun 30, 2018

@JA-AmbosImmo You can set env variable on Settings tab at Heroku image

@JulienAmbos
Copy link

Is this the same as passing it with the Procfile?

@jincod
Copy link
Owner Author

jincod commented Jun 30, 2018

@JA-AmbosImmo yes, you find more info here https://devcenter.heroku.com/articles/config-vars

@JulienAmbos
Copy link

Thank you very much!

@xt449
Copy link
Contributor

xt449 commented Aug 25, 2018

Not sure if I should put this here or make a new issue for it.
I'm trying to setup a worker dyno for my app instead of web, but from the articles I read, that needs to be defined in the procfile? So I'll have to wait for custom procfiles for this buildpack, correct?

@jincod
Copy link
Owner Author

jincod commented Aug 25, 2018

Hi @xt449,

We 've already added support of custom procfile here #53. Could you please test it for you scenario?

@xt449
Copy link
Contributor

xt449 commented Aug 26, 2018

Alright, I got that working now. I never used custom profiles before so I was not sure how to do it, but this was really easy to get working. The only slight issue I may have is that is appears to take longer to verify the deployment, but I think this is on Heroku's end?

Here's another question though, how can I get this to work without needing the Startup class?

@jincod
Copy link
Owner Author

jincod commented Aug 27, 2018

Hi @xt449,

The only slight issue I may have is that is appears to take longer to verify the deployment, but I think this is on Heroku's end?

Unfortunately I didn't understand what do you mean?

Here's another question though, how can I get this to work without needing the Startup class?

You can set PROJECT_FILE environment variable at Heroku and it will use instead of using Startup.cs (https://github.com/jincod/dotnetcore-buildpack/blob/master/bin/compile#L40)

@xt449
Copy link
Contributor

xt449 commented Aug 27, 2018

Sorry. I meant that it takes git longer to finish.
Specifically for the remote to send Verifying deploy... done.

@jincod
Copy link
Owner Author

jincod commented Aug 27, 2018

Understood. It's Heroku workflow.

For example, you can see log output for git push heroku master for Rails application https://devcenter.heroku.com/articles/getting-started-with-rails5#deploy-your-application-to-heroku

@xt449
Copy link
Contributor

xt449 commented Aug 28, 2018

Alright just wanted to follow up that it seems to be working.
Setting the PROJECT_FILE to the startup class I want doesn't seem to work for me :
I lost the git log for that one...
However I still seem to need Startup.cs :
Remote: Remote: -----> App not compatible with buildpack: https://github.com/jincod/dotnetcore-buildpack.git Remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure Remote: Remote: ! Push failed Remote: Verifying deploy... Remote: Remote: ! Push rejected to bot-vohelpyo. Remote: Error: failed to push some refs to 'https://git.heroku.com/bot-vohelpyo.git' Error encountered while pushing to the remote repository: rejected master -> master (pre-receive hook declined)

I will give more information on this tomorrow. This is poorly written since I just typed this up before going to sleep.

@jincod
Copy link
Owner Author

jincod commented Aug 28, 2018

@xt449 Right. I forgot about buildpack detect. Could you please create new issue and describe why you don't need Startup.cs file?

@jincod
Copy link
Owner Author

jincod commented Aug 28, 2018

Implemented at #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants