Open eric-burel opened 6 years ago
Did you see http://docs.vulcanjs.org/#Git-Based-Deploys ?
Unless I'm wrong, Heroku deploys work by pushing your git code to the server first, the buildpack only takes over then. In that context METEOR_PACKAGE_DIRS
makes no difference, you'll always only deploy what's inside the git repo no matter what.
Hi @SachaG , I think it is a bit more complex on Heroku, I think you don't simply push your app on the server and run it. E.g your app is built in a tmp/foobar/
folder or smth like that and then moved by Heroku to /app/
, but Heroku doc is complete crap and I can't clearly be sure of what happens.
The submodule (here Vulcan libs) is correctly pushed to Heroku along with the app in /app/my-vulcan-libs/
, but METEOR_PACKAGE_DIRS=/app/my-vulcan-libs/packages
seems incorrect, as if the files were not yet available at build time. So it is never found by Meteor, and thus the main app load the packages from Atmosphere instead.
I'll share a doc as soon as I get it working. But of course maybe it is not related to buildpack, I may miss something else.
Don't you deploy with git push
? Or is there another way?
Yes I deploy git push
, but Heroku does a lot of thing then, I don't know exactly where I push on the server. The /app/
folder does not seem to be the orginal pushed repo, but only a built copy, it does not a contain a .git
. It is still a bit unclear to me though.
Well if you deploy with git push
only the things committed inside your git repo will be pushed to Heroku.
Yep the submodules are indeed commited, Heroku loads them according to the .gitmodules
and confirm it in the log when I push. It is is the first thing Heroku does, so that all code is present during build.
I have even checked with heroku run bash
, the main app and its subrepo containing Vulcan are there in the /app
folder, and METEOR_PACKAGE_DIRS
points to the correct dir (checked with a cd METEOR_PACKAGE_DIRS
).
It's simply that the /app
folder seems to be where the files are after build, but not during build, hence the fact that the METEOR_PACKAGE_DIRS
gets ignored, it points to files that do not exists yet (but will exist after build, too late). At least this is how I understand it for the moment.
I'll try with a relative path instead instead asap.
Yes but what does METEOR_PACKAGE_DIRS
have to do with git submodules?
The submodule is my fork of Vulcan, containing slightly patched libs (e.g to fix the CORS issue with Cordova). So Heroku clone this fork automatically along with my app, and METEOR_PACKAGE_DIRS
points to its packages folder, so that I use my fork of Vulcan instead of the Atmosphere package, as I do locally.
@eric-burel I noticed you've brought up this issue on several buildpack repos. I have the exact same issue right now where I have a local version of a meteor package in my app under the packages directory. When I try deploying to Heroku, I keep getting an error that there is an unknown package in top-level dependencies which I'm guessing is coming from meteor not recognizing the local package. Had you found a solution to this issue? Alternatively, is there a platform to deploy to other than Heroku that handles this better?
Type of problem
Summary
Contents of
.meteor/release
Buildpack version
Deployment target
Heroku
Hi,
I can't have
METEOR_PACKAGE_DIRS
to be taken into account during app build/run. It is set to/app/.submodules/my-repo/packages
and the folder exist, I checked out in the bash.However, it behaves as if ignored, I guess during build the path is different (e.g I should write
/tmp/.submodules/...
instead of/app
or simply./
, could not test yet) but I am not sure and I can't find a solution. Maybe the buildpack is a good place to handle this ?