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

Compatibility with monorepos (multi-procfile buildpack)? #58

Closed
ddahan opened this issue Feb 14, 2023 · 2 comments
Closed

Compatibility with monorepos (multi-procfile buildpack)? #58

ddahan opened this issue Feb 14, 2023 · 2 comments

Comments

@ddahan
Copy link

ddahan commented Feb 14, 2023

What is the right way to use this buildback, while using Heroku Multi Procfile buildpack in the same time?

I tried this way:

image

My Python app (and Procfile) is in back/ folder of my root repo. Obviously, I soon as I tried to deploy, I get this error:

image

Any idea? workaround? Thanks.

@zyv
Copy link
Contributor

zyv commented Feb 14, 2023

My Python app (and Procfile) is in back/ folder of my root repo. Obviously, I soon as I tried to deploy, I get this error:

I don't think that this is related to Heroku Multi Procfile buildpack. This is how we detect a compatible app:

if [ ! -f "$BUILD_DIR/poetry.lock" ] ; then

(we look for poetry.lock in the root folder of the app)

Even if we would add some way to specify a custom path for poetry.lock, then I'm pretty sure that then next buildpack (Python) will fail, because it expects requirements.txt in the root directory:

https://github.com/heroku/heroku-buildpack-python/blob/59e24ef8bbda64832b5dcc0145404ac73fa8f3cf/bin/detect#L18

We could of course generate requirements.txt in the root directory, but this sounds very questionable.

I believe that this is out of the scope of this buildpack. There are several external solutions for apps in subdirectories that generally work for all buildpacks:

  1. Symlink project files like pyproject.toml and poetry.lock
  2. Use standalone or inline buildpack to move the source code
  3. Using subtree push

I think that's enough poison to pick from...

@zyv zyv closed this as completed Feb 14, 2023
@ddahan
Copy link
Author

ddahan commented Feb 14, 2023

Thanks for the detailed answer. I didn't know about subdir heroku buildpack!

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

No branches or pull requests

2 participants