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

Companion heroku deployment broken #3362

Closed
1 of 2 tasks
mifi opened this issue Dec 11, 2021 · 0 comments · Fixed by #3388
Closed
1 of 2 tasks

Companion heroku deployment broken #3362

mifi opened this issue Dec 11, 2021 · 0 comments · Fixed by #3388
Labels
Build Build setup: bundlers, packages, styles, UMD, dist Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3)

Comments

@mifi
Copy link
Contributor

mifi commented Dec 11, 2021

Heroku deploy fails: https://github.com/transloadit/uppy/runs/4473760891?check_suite_focus=true

I believe this is because it tries to do npm install inside the companion subdirectory, and it will use the wrong version of @types/redis and crashes.

See also #3355

While heroku does support yarn install, there are some issues:

  • yarn install needs to be done from the root dir
  • must use "heroku-postbuild": "cd packages/@uppy/companion && yarn run build" inside monorepo root package.json as by default heroku will call npm run build.
  • should only yarn install companion workspace and not the whole uppy repo, as it will take a lot more time
  • heroku doesn't seem to support yarn workspaces focus

Alternative: Use docker

https://devcenter.heroku.com/articles/build-docker-images-heroku-yml

I tried in this branch https://github.com/transloadit/uppy/tree/fix-heroku-yarn and it almost worked, but experienced these issues:

  • COMPANION_DATADIR cannot be ./out.
    • Setting it to /tmp seemed to fix that
  • apparently all heroku servers need to listen to the heroku-assigned environment variable PORT. So it cannot listen to 3020.
    • I got this error: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of
    • heroku doesn't support EXPOSE so we may need to change the docker file
@Murderlon Murderlon added Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3) Build Build setup: bundlers, packages, styles, UMD, dist and removed Triage Bug labels Dec 13, 2021
@kiloreux kiloreux linked a pull request Jan 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Build setup: bundlers, packages, styles, UMD, dist Companion The auth server (for Instagram, GDrive, etc) and upload proxy (for S3)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants